Hello guys, need some simple help here.
This is my coding, when the interface started and when there's no network connection, it will keep looping until there's network connection. While in the looping, when click on the GUI cancel button or window close event, the script will stop running and exit. My problem here's i couldnt click the cancel button nor the window close event to exit. I only managed to press the "{ESC}" to terminate the script. Appreciate someone can help me. i tried many times but i failed and gave up.
Global $site = "http://www.bing.com" Global $up= Ping("www.bing.com") HotKeySet("{ESC}", "_Exit") if $up = 0 Then $msg = GUIGetMsg() do $up= Ping("www.bing.com") sleep(2000) Until $up <> 0 or $msg = $GUI_EVENT_CLOSE Or $msg = $Cancel Func _Exit() Exit EndFunc ;==>_Exit
This is my coding, when the interface started and when there's no network connection, it will keep looping until there's network connection. While in the looping, when click on the GUI cancel button or window close event, the script will stop running and exit. My problem here's i couldnt click the cancel button nor the window close event to exit. I only managed to press the "{ESC}" to terminate the script. Appreciate someone can help me. i tried many times but i failed and gave up.