Well, long story short - This is the main script
Opt("GUIOnEventMode", 1)
$Gui = GUICreate("Gui",500,700,-1,-1,$WS_POPUP,-1)
bla-bla-bla
GUISetState(@SW_SHOW,$Gui)
while 1
sleep(1)
wend
Func button_Connect()
ShellExecute(@scriptdir&"\serverapp_nowin.jar")
;~ #include "data\dav_hotkey.au3"
Run("srv.exe")
$toggle = true
Endfunc
Func button_Dissconect()
ProcessClose("javaw.exe")
ProcessClose("srv.exe")
$toggle = false
Endfunc
the second is a file reading loop and keystrokes sender. while $toggle .....
when i try to close the script (or minimize, close the ui, etc) it does nothing. It's kind of logical, being stuck in the second loop...
___
Adlibregister i'll look into it