Sign in to follow this  
Followers 0
Customprofile

Looping and Stopping AutoIt

6 posts in this topic

Here is what I has so far, which i snot much:

MouseClick("left", 1000, 922, 2)

MouseClick("left", 1200, 922, 2)

sleep(800)

MouseClick("left", 1000, 687, 2)

Now at the end of this I was to be able to add the function to stop it with a key press nad also loop this script. I have searched and read the forums and the help File, I am not uinderstanding how to add these two features.

Share this post


Link to post
Share on other sites

For starters...Look for HotkeySet in the help file....

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

For starters...Look for HotkeySet in the help file....

Thank you but if you would have read my first post I mentioned I did not know how to put those into the script. I read that, I am unclear on how to add it. And there is two parts to my first post

Edited by Customprofile

Share this post


Link to post
Share on other sites

I did not know how to put those into the script.

Sure you can look at the examples in the help file.

You can't just look at the Hotkeyset function and create your script...what you will have to do is look at the help file for other examples and then combine all of the functions you would like to use into 1 script....the best way for you to learn is to keep posting your modified code...

Share this post


Link to post
Share on other sites

Sure you can look at the examples in the help file.

You can't just look at the Hotkeyset function and create your script...what you will have to do is look at the help file for other examples and then combine all of the functions you would like to use into 1 script....the best way for you to learn is to keep posting your modified code...

Ok been playing with it... I am not sure if this is working, but it seems too.

for $__n1_ = 0 to 0 step 0

Sleep ( 300 )

survey ( )

if WinExists ( 'Untitled - Notepad', '' ) then

Sleep ( 1000000 )

endif

next

Func survey ( )

craft1 ( )

Return

EndFunc ; survey

Func craft1 ( )

MouseClick( "left", 633, 329, 2 )

MouseClick( "left", 633, 329, 2 )

MouseClick( "left", 694, 329, 2 )

MouseClick( "left", 694, 329, 2 )

MouseClick( "left", 633, 329, 2 )

MouseClick( "left", 633, 329, 2 )

MouseClick( "left", 694, 329, 2 )

MouseClick( "left", 694, 329, 2 )

Return

EndFunc ; craft1

Is this right or am i still missing something

Share this post


Link to post
Share on other sites

Just a little fixes....keep playin around with it...u will get it....

HotKeySet("+!s", "Quit") ;Shift-Alt-S

While 1

Sleep ( 300 )
craft1 ( )
if WinExists ( 'Untitled - Notepad', '' ) then
Sleep ( 1000000 )
endif

WEnd


Func craft1 ( )
MouseClick( "left", 633, 329, 2 )
MouseClick( "left", 633, 329, 2 )
MouseClick( "left", 694, 329, 2 )
MouseClick( "left", 694, 329, 2 )
MouseClick( "left", 633, 329, 2 )
MouseClick( "left", 633, 329, 2 )
MouseClick( "left", 694, 329, 2 )
MouseClick( "left", 694, 329, 2 )
EndFunc; craft1

Func Quit ()
Exit
EndFunc

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