Sign in to follow this  
Followers 0
AzGuL^

How do I make it loop?

8 posts in this topic

HotKeySet("{END}", "End")
HotKeySet("{DEL}", "Go")

While 1
    Sleep(1)
WEnd

Func End()
    Exit
EndFunc

Func Go()
    MouseClick("left", 493, 462, 1, 2)
    Send("1")
    Send("{ENTER}")
EndFunc

I don't understand the command reference part about loops :-/ What do I need to add to make it loop till I press END? :o

Share this post


Link to post
Share on other sites



HotKeySet("{END}", "End")
HotKeySet("{DEL}", "Go")

While 1
    Sleep(1)
WEnd

Func End()
    Exit
EndFunc

Func Go()
    MouseClick("left", 493, 462, 1, 2)
    Send("1")
    Send("{ENTER}")
EndFunc

I don't understand the command reference part about loops :-/ What do I need to add to make it loop till I press END? :o

Do you think anything is missing in the posted script ? did you try it ?


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

The thing missing is the loop, because I didn't understand this;

http://www.autoitscript.com/autoit3/docs/i.../lang_loops.htm

This is the loop

While 1
    Sleep(1)
WEnd

It will keep your script active so the every time you press DEL it will perform the function GO.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

The thing missing is the loop, because I didn't understand this;

http://www.autoitscript.com/autoit3/docs/i.../lang_loops.htm

mmmh...

what do you think this portion does:

While 1
    Sleep(1)
WEnd

:o


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

But I need it be be like this;

I press DEL

It loops the script till I press END

EDIT; So what do I change? :o

EDIT2; It needs to loop the GO function.

Edited by AzGuL^

Share this post


Link to post
Share on other sites

Here is one way

HotKeySet("{END}", "End")
HotKeySet("{DEL}", "Go")

While 1
    Sleep(1)
WEnd

Func End()
    Exit
EndFunc

Func Go()
    While 1
    MouseClick("left", 493, 462, 1, 2)
    Send("1")
    Send("{ENTER}")
    Sleep(1)
    WEnd
EndFunc


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

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