Jump to content

Slow program


 Share

Recommended Posts

hy guys, i have one problem with my first program.

just sometimes react, these GUI buttons is very slowly get react, i need more than 1 click to activate one button :S,

and after when i could use the Start, the buttons never get react xD, (sry for my bad english) plz help anyone. and with Pause options i cant pausing script :S,

$Form1 = GUICreate("Test Progress", 429, 182, 303, 198)
$Group1 = GUICtrlCreateGroup("Bot Menü", 16, 16, 393, 145)
$Button1 = GUICtrlCreateButton("Start", 24, 128, 75, 25)
$Button2 = GUICtrlCreateButton("Readme", 240, 128, 75, 25)
$Button3 = GUICtrlCreateButton("Exit/F10", 320, 128, 75, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


While 1 ;Exit
$msg = GUIGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE
Exit
Case $Button3
Exit
EndSwitch

; About
$msg = GUIGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE

Case $Button2
MsgBox(0,"About","bla bla bla")
EndSwitch

; About
$msg = GUIGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE

Case $Button1
ToolTip("Bot is Running",0,0)
While 1
WinActivate("[CLASS:Notepad]")
Send ("y")
send ("1")
Sleep (1000)
Send ("2")
Sleep (1000)
Send ("3")
Sleep (10)
Send ("{SPACE}")
Sleep (10)
Send ("{SPACE}")
Sleep (10)
Send ("{SPACE}")
Sleep (10)
Send ("y")
send ("1")
Sleep (1000)
Send ("2")
Sleep (1000)
Send ("3")
Sleep (10)
Send ("{SPACE}")
Sleep (10)
Send ("{SPACE}")
Sleep (10)
Send ("{SPACE}")
Send ("7")
Sleep (10)
Send ("y")
send ("1")
Sleep (1000)
Send ("2")
Sleep (1000)
Send ("3")
Sleep (10)
Send ("{SPACE}")
Sleep (10)
Send ("{SPACE}")
Sleep (10)
Send ("{SPACE}")
send ("!1")
send ("!2")
send ("!3")
send ("!4")
send ("!5")
send ("!6")
send ("!7")
send ("!8")
WEnd

EndSwitch

WEnd
Link to comment
Share on other sites

Multiple GUIGetMsg()

EDIT:

Plenty of Pause scripts/example in this forum.

#include <GUIConstants.au3>

$Form1 = GUICreate("Test Progress", 429, 182, 303, 198)
$Group1 = GUICtrlCreateGroup("Bot Menü", 16, 16, 393, 145)
$Button1 = GUICtrlCreateButton("Start", 24, 128, 75, 25)
$Button2 = GUICtrlCreateButton("Readme", 240, 128, 75, 25)
$Button3 = GUICtrlCreateButton("Exit/F10", 320, 128, 75, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###


While 1 ;Exit
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button3
            Exit
            ; About
        Case $Button2
            MsgBox(0, "About", "bla bla bla")
            ; About
        Case $Button1
            ToolTip("Bot is Running", 0, 0)
            While 1
                WinActivate("[CLASS:Notepad]")
                Send("y")
                Send("1")
                Sleep(1000)
                Send("2")
                Sleep(1000)
                Send("3")
                Sleep(10)
                Send("{SPACE}")
                Sleep(10)
                Send("{SPACE}")
                Sleep(10)
                Send("{SPACE}")
                Sleep(10)
                Send("y")
                Send("1")
                Sleep(1000)
                Send("2")
                Sleep(1000)
                Send("3")
                Sleep(10)
                Send("{SPACE}")
                Sleep(10)
                Send("{SPACE}")
                Sleep(10)
                Send("{SPACE}")
                Send("7")
                Sleep(10)
                Send("y")
                Send("1")
                Sleep(1000)
                Send("2")
                Sleep(1000)
                Send("3")
                Sleep(10)
                Send("{SPACE}")
                Sleep(10)
                Send("{SPACE}")
                Sleep(10)
                Send("{SPACE}")
                Send("!1")
                Send("!2")
                Send("!3")
                Send("!4")
                Send("!5")
                Send("!6")
                Send("!7")
                Send("!8")
            WEnd

    EndSwitch

WEnd
Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

This thread has been erroneously reported as being about game automation. Where's the proof? To the person(s) who reported it, ask yourself that question before reporting in the future. The last time I checked the word "bot" wasn't used exclusively with game automation and that is the only thing even resembling any hint this might be about a game. Otherwise this is just a standard question that's been asked a dozen times on the forum.

Link to comment
Share on other sites

This thread has been erroneously reported as being about game automation. Where's the proof? To the person(s) who reported it, ask yourself that question before reporting in the future. The last time I checked the word "bot" wasn't used exclusively with game automation and that is the only thing even resembling any hint this might be about a game. Otherwise this is just a standard question that's been asked a dozen times on the forum.

Perhaps it's because of the ONE post that got locked because it was game automation. So people are ASSUMING this is a game automation program. I'm pretty sure this isn't so I'm not reporting.

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...