I have a GUI, one of its button trigger a function, but the variables submitted in the GUI part cease to exist after I call the function. As far I as I understood the Manual, GUI variables are global, right? So I have no clue what is my fault.
Code:
Gui, Add, Button, x126 y193 w80 h30 , &Cancel
Gui, Add, Button, x226 y193 w80 h30 , &SLEEP
Gui, Add, Text, x6 y23 w150 h20 vTIME, Time
Gui, Add, Edit, x166 y23 w140 h20 vmuteTimer, 0650
Gui, Add, CheckBox, x6 y83 w250 h20 vTORRENT_KI, P2P shall run?
Gui, Add, CheckBox, x6 y113 w250 h20 vSLSK_KI, Slsk shall run?
Gui, Add, CheckBox, x6 y143 w250 h20 vMIRANDA_ON, IM status?
Gui, Show, x338 y221 h239 w328, Sunrise
Return
ButtonCancel:
GuiClose:
ExitApp
ButtonSLEEP:
Gui, submit
MsgBox,%muteTimer%`n%TORRENT_KI%`n%SLSK_KI%`n%MIRANDA_ON%
Main()
ExitApp
Main()
{
MsgBox,%muteTimer%`n%TORRENT_KI%`n%SLSK_KI%`n%MIRANDA_ON%
[...]
I check the existence of my variables with the two MsgBox, and the first one is OK, the second is totally empty, all the variables are blank.