The code:
Code: Select all
Define.s Word
Word = GetEnvironmentVariable("PB_TOOL_Word")
If Word
If Right(Word, 1) = "_"
Word = Left(Word, Len(Word) -1)
ElseIf Left(Word, 1) = "#"
Word = Right(Word,Len(Word) -1)
EndIf
RunProgram("rundll32.exe","url.dll,FileProtocolHandler http://www.google.de/search?q=site:msdn.microsoft.com+msdn+win32+" + Word + "&btnI=true", "")
EndIf
This code will display all of the environment variables:
Code: Select all
; Author: Wicker Man
; Date: May 22 2009
; OS: All
; Demo: No
; More codes at: www.geocities.com/kc2000labs/pb/pb.htm
If OpenWindow(0, 0, 0, 640, 520, "Environment Variables", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)
If CreateGadgetList(WindowID(0))
ListIconGadget(0,10,10,621,500,"Variable",200,#PB_ListIcon_GridLines | #PB_ListIcon_FullRowSelect)
EndIf
AddGadgetColumn(0,1,"Data",400)
If ExamineEnvironmentVariables()
While NextEnvironmentVariable()
AddGadgetItem(0,-1,EnvironmentVariableName()+Chr(10)+EnvironmentVariableValue())
Wend
EndIf
Repeat
EventID = WaitWindowEvent()
If EventID = #PB_Event_CloseWindow
Quit = 1
EndIf
Until Quit = 1
EndIf
Why doesn't PB_Tool_Word show up in the list of environment variables? Why aren't any of the other variables in the help file showing up? If these aren't available with ExamineEnvironmentVariables(), then how would we find them? For instance if there was another program we wanted to see their variables, would that be possbile, or do we just have to be told what they are?


PB_TOOL_IDE - Full path and filename of the IDE
PB_TOOL_Compiler - Full path and filename of the Compiler
PB_TOOL_Language - Language currently used in the IDE
PB_TOOL_FileList - A list of all open files in the IDE, separated by Chr(10)
PB_TOOL_Debugger - These variables provide the settings from the Compiler Options
PB_TOOL_InlineASM window for the current source. They are set to "1" if the option
PB_TOOL_Unicode is enabled, and "0" if not.
PB_TOOL_Thread
PB_TOOL_XPSkin
PB_TOOL_OnError
PB_TOOL_SubSystem - content of the "Subsystem" field in the compiler options
PB_TOOL_Executable - same as the %COMPILEFILE token for the commandline
PB_TOOL_Cursor - same as the %CURSOR token for the commandline
PB_TOOL_Selection - same as the %SELECTION token for the commandline
PB_TOOL_Word - same as the %WORD token for the commandline
PB_TOOL_MainWindow - OS handle to the main IDE window
PB_TOOL_Scintilla - OS handle to the Scintilla editing component of the current source