Sign in to follow this  
Followers 0
philo

Looping

7 posts in this topic

#1 ·  Posted (edited)

Hi i can someone help me with this.

I want left click until {pause} is pressed

HotKeySet("{PAUSE}", "TogglePause")
Hotkeyset("{ESC}", "terminate")

func Terminate()
    Exit
    endfunc 

Func TogglePause()
  Do
  MouseClick("left")
  
  until 


   EndFunc
   
   While 1
    WEnd

Got this but it is incomplete

Edited by philo

Auto It Ruels

Share this post


Link to post
Share on other sites



Hi i can someone help me with this.

I want left click until {pause} is pressed

<{POST_SNAPBACK}>

Something like:

HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
$ClickMouse = 1
While 1
    If $ClickMouse Then MouseClick("left")
    Sleep(5)
WEnd

Func Terminate()
    Exit
EndFunc  ;==>Terminate

Func TogglePause()
    $ClickMouse = Not $ClickMouse
EndFunc  ;==>TogglePause

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

#3 ·  Posted (edited)

You were really close

i cleaned your code up a little

HotKeySet("{PAUSE}", "TogglePause")

Hotkeyset("{ESC}", "terminate")

While 1

Sleep(50) ; slow processor

WEnd

Func Terminate()

Exit

Endfunc

Func TogglePause()

;Do

MouseClick("left")

;Until----what???

EndFunc

Do .... is ok

Until .... needs to know whar/when or ??????

enjoy

EDIT the boss man got here first - JdeB .... only by seconds

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

Thanks guys


Auto It Ruels

Share this post


Link to post
Share on other sites

Can you change it so that it start off if you start the script.

because if i run it now it starts a 1000 times

Thanks


Auto It Ruels

Share this post


Link to post
Share on other sites

Can you change it so that it start off if you start the script.

because if i run it now it starts a 1000 times

Thanks

<{POST_SNAPBACK}>

Serious question? :(

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

Got it fixed :(


Auto It Ruels

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