Sign in to follow this  
Followers 0
suxxor

Very simple script

8 posts in this topic

Hi, could somebody post a code snippet so what when i press a button "end" for example the mouse clicks every .10 seconds until I hit "end" again?

thanks :o

Share this post


Link to post
Share on other sites



Welcome to Autoit

; Press Esc to terminate script, End to "Run"

Global $Paused
HotKeySet("{END}", "TogglePause")
HotKeySet("{ESC}", "Terminate")


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

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        ToolTip('Script is "Running"',0,0)
        sleep(100)
        MouseClick("Left")
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Merry Christmas

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

thanks for helping, ill learn all i can from your script :]

Share this post


Link to post
Share on other sites

Q: What could I do to make it so that when I hit Esc it stops the function instead of terminating it? Then after I could start it again by pressing end again.

Thanks <3

Share this post


Link to post
Share on other sites

@merry christmas ? i'm in a time warp !

Share this post


Link to post
Share on other sites

it does what you asked

i press a button "end" for example the mouse clicks every .10 seconds until I hit "end" again?

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

look at hotkeyset in the helpfile, pause. press {pause} pauses the script, {pause} resumes.

Share this post


Link to post
Share on other sites

nvm got it thanks ;]

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