Jump to content
Dai_Lucerne

Looping problem, or goto?

Recommended Posts

Dai_Lucerne
Posted (edited)

Solved.

Edited by Dai_Lucerne
Solved

Share this post


Link to post
Share on other sites
Jos

You never finished this thread with your other account you created: 

I guess it is time to read our forumrules first now and don't create an account for each question! 

Jos

 


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

Share this post


Link to post
Share on other sites
Dai_Lucerne

I apologize for doing so, simply forgot my account name.

 

Is there any alternative to a goto function or anything similar?

Share this post


Link to post
Share on other sites
badcoder123

If you want it always running it's probably better if you put it in a loop such as

#include <AutoItConstants.au3>


HotKeySet("+9", "Terminate")
HotKeySet("+5", "Lucerne")


While 1
  MouseDown("left")
  $point = PixelSearch(957,537,963,541, 0xFE4040, 3)
  Sleep(1800)
  If IsArray($point) Then MouseUp("left")
WEnd


Func Terminate()
   Exit 
EndFunc

or 

#include <AutoItConstants.au3>


HotKeySet("+9", "Terminate")
HotKeySet("+5", "Lucerne")

While 1
    ;insert script...
    Lucerne()
    ;insert script...
WEnd


Func Lucerne()
  MouseDown("left")
  $point = PixelSearch(957,537,963,541, 0xFE4040, 3)
  Sleep(1800)
  If IsArray($point) Then MouseUp("left")
EndFunc


Func Terminate()
   Exit
EndFunc

if you want the script to run while looping pixelsearch maybe look into the AdLibRegister  function

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

×