Jump to content

Looping


Recommended Posts

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

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Developers

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? :(

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...