When I put "Gui, Add, ActiveX" into the function, I get an "A control's variable must be global or static" error. Why need to declare the "WB" variable as global or static?
Code: Select all
Error: A control's variable must be global or static.
Specifically: vWB
Line#
001: F()
004: {
---> 005: Gui,Add,ActiveX,w980 h640 vWB,Shell.Explorer
006: WB.Navigate("https://autohotkey.com/")
007: Gui,Show
009: Return
010: }
011: Exit
012: Exit
012: Exit
The current thread will exit.
Code: Select all
F()
return
F()
{
Gui, Add, ActiveX, w980 h640 vWB, Shell.Explorer
WB.Navigate("https://autohotkey.com/")
Gui, Show
return
}