Sign in to follow this  
Followers 0
Joshuaaaa

How can I loop this script?

5 posts in this topic

I downloaded a .exe somebody created with autoit in which automates everything as you go, creating a .au3 file when you're finished so you can re-trace your moves and it automates all you did when you open it.

When I go "Edit" the script, I get the code:

Sleep(2000)

MouseClick("left",486,752,1)
Sleep(2337.78930003674)

MouseClick("left",368,210,1)
Sleep(2246.98111072776)
MouseClick("right",345,649,1)
Sleep(3484.61801709435)
Send("{LCTRL}")
Sleep(711.176979197077)
MouseClick("left",284,497,1)
Sleep(202.990882919477)
MouseClick("left",176,452,1)
Sleep(1038.98819542707)
MouseClick("left",176,452,1)
Sleep(1068.56066902358)
MouseClick("left",176,452,1)
Sleep(948.730634759446)
MouseClick("right",620,466,1)
Sleep(1055.64617849475)
MouseClick("left",772,261,1)
Sleep(564.872909825131)
MouseClick("right",774,262,1)
Sleep(586.408887163033)
MouseClick("left",673,141,1)
Sleep(611.438883992239)
MouseClick("right",576,138,1)
Sleep(570.483399426463)
MouseClick("left",377,118,1)
Sleep(676.397139859954)
MouseClick("right",377,118,1)
Sleep(455.25814035024)
MouseClick("left",300,283,1)
Sleep(830.602772140035)
MouseClick("right",308,357,1)
Sleep(743.217364218078)
Send("{CTRLUP}{F1}")
Sleep(1524.85329839407)
Send("{F5}")
Sleep(2053.22827342581)
MouseClick("left",582,469,1)
Sleep(2549.10638083891)
Send("{LSHIFT}")
Sleep(2491.76836720868)
Send("{SHIFTDOWN}{ALT}")
Sleep(300.845498520063)
Send("{SHIFTUP}{CTRLUP}{ALTUP}{LWINUP}{RWINUP}")

But I would like to loop this, rather than just have it play-over once. How can I do this? I've been trying at this for sometime now, thought I'd ask for some assistance. Thanks :)

Share this post


Link to post
Share on other sites



Maybe...

; Press Esc to terminate script, Pause/Break to "pause"

Global $Paused, $Runner
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("{F9}", "ShowMe")

;;;; Body of program would go here ;;;;
While 1
    Sleep(100)
WEnd
;;;;;;;;

Func TogglePause()
    $Paused = Not $Paused
    While $Paused
        Sleep(100)
        ToolTip('Script is "Paused"', 0, 0)
    WEnd
    ToolTip("")
EndFunc   ;==>TogglePause

Func Terminate()
    Exit 0
EndFunc   ;==>Terminate

Func ShowMe()
    $Runner = Not $Runner
    While $Runner
        Sleep(2000)

        MouseClick("left", 486, 752, 1)
        Sleep(2337.78930003674)

        MouseClick("left", 368, 210, 1)
        Sleep(2246.98111072776)
        MouseClick("right", 345, 649, 1)
        Sleep(3484.61801709435)
        Send("{LCTRL}")
        Sleep(711.176979197077)
        MouseClick("left", 284, 497, 1)
        Sleep(202.990882919477)
        MouseClick("left", 176, 452, 1)
        Sleep(1038.98819542707)
        MouseClick("left", 176, 452, 1)
        Sleep(1068.56066902358)
        MouseClick("left", 176, 452, 1)
        Sleep(948.730634759446)
        MouseClick("right", 620, 466, 1)
        Sleep(1055.64617849475)
        MouseClick("left", 772, 261, 1)
        Sleep(564.872909825131)
        MouseClick("right", 774, 262, 1)
        Sleep(586.408887163033)
        MouseClick("left", 673, 141, 1)
        Sleep(611.438883992239)
        MouseClick("right", 576, 138, 1)
        Sleep(570.483399426463)
        MouseClick("left", 377, 118, 1)
        Sleep(676.397139859954)
        MouseClick("right", 377, 118, 1)
        Sleep(455.25814035024)
        MouseClick("left", 300, 283, 1)
        Sleep(830.602772140035)
        MouseClick("right", 308, 357, 1)
        Sleep(743.217364218078)
        Send("{CTRLUP}{F1}")
        Sleep(1524.85329839407)
        Send("{F5}")
        Sleep(2053.22827342581)
        MouseClick("left", 582, 469, 1)
        Sleep(2549.10638083891)
        Send("{LSHIFT}")
        Sleep(2491.76836720868)
        Send("{SHIFTDOWN}{ALT}")
        Sleep(300.845498520063)
        Send("{SHIFTUP}{CTRLUP}{ALTUP}{LWINUP}{RWINUP}")
    WEnd
EndFunc   ;==>ShowMe

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Thank you so much :)

Share this post


Link to post
Share on other sites

Thank you so much :)

Welcome!

8)


NEWHeader1.png

Share this post


Link to post
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
Sign in to follow this  
Followers 0