Guest Shakra Posted June 22, 2004 Posted June 22, 2004 Ok, i have a problem. I made a gui, theres 3 buttons on it. Start, Pause, Restart. The start button, when pressed, will maximize a already existant windows and click enter until pause is pressed. My problem is even when i press Pause, it continue to click on enter. Heres the code of my gui, i hope someone can help me expandcollapse popup$timer = 0; Opt("GUICoordMode", 1) Opt("GUINotifyMode", 1) GuiCreate("LoL", 115,206,(@DesktopHeight-115)/2, (@DesktopHeight-206)/2 , 0x04CF0000) $start = GUISetControl("button", "Start", 30, 40, 60, 20) $pause = GUISetControl("button", "Pause", 30, 80, 60, 20) $restart = GUISetControl("button", "Restart", 30, 120, 60, 20) $made = GUISetControl("pic", "made.gif", 20, 10, 80, 20) $more = GUISetControl("pic", "more.gif", 10, 160, 100, 20) GuiShow() While 1 sleep(100) $msg = GuiMsg(0) Select Case $msg = -3 Exit Case $msg = 5 ;;; Case $msg = $start WinActivate("Lords of Lords Default - Netscape","") $timer = 1; Do Send("{ENTER down}") Until $timer = 0; Case $msg = $pause $timer = 0; Do Sleep(100) Until $timer = 1; Case $msg = $restart WinActivate("Lords of Lords Default - Netscape","") $timer = 1; Do Send("{ENTER down}") Until $timer = 0; Case $msg = $made ;;; Case $msg = $more ;;; EndSelect WEnd Exit
Developers Jos Posted June 22, 2004 Developers Posted June 22, 2004 Have a look at this code and see if that helps: $TIMER = 0; Opt ("GUICoordMode", 1) Opt ("GUINotifyMode", 1) GUICreate("LoL", 115, 206, (@DesktopHeight - 115) / 2, (@DesktopHeight - 206) / 2, 0x04CF0000) $START = GUISetControl("button", "Start", 30, 40, 60, 20) $PAUSE = GUISetControl("button", "Pause", 30, 80, 60, 20) $RESTART = GUISetControl("button", "Restart", 30, 120, 60, 20) GUIShow() While 1 Sleep(100) $MSG = GUIMsg(0) Select Case $MSG = -3 Exit Case $MSG = $START $TIMER = 1; msgbox(0,'Enter' ,'Enter',1) Case $MSG = $PAUSE $TIMER = 0; msgbox(0,' Pause' ,'Pause',1) Case $MSG = $RESTART msgbox(0,' Restart' ,'Restart',1) Case $TIMER = 0 msgbox(0,' Timer=0' ,' Timer=0',1) Case $TIMER = 1 msgbox(0,' Timer=1' ,' Timer=1',1) EndSelect Wend Exit SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Guest Shakra Posted June 22, 2004 Posted June 22, 2004 Thanks, it works Now i will modifie it so it can log in from the beginning. Thanks alot
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now