Sign in to follow this  
Followers 0
qwqwwqwdwd

NEEd help on my script

4 posts in this topic

$coord = PixelSearch( 0, 1, 1076, 691, 0xa62300 )
If @error=0 Then MouseClick("right", $coord[0], $coord[1], 1, 0)
Send( "Down" )
Sleep( 5000 )
Exit

how can i make this keep repeating in every 2 minute? please help

Share this post


Link to post
Share on other sites



You should set your script into a loop

here:

#include <Misc.au3>

Do
    $coord = PixelSearch( 0, 1, 1076, 691, 0xa62300 )
    If @error=0 Then MouseClick("right", $coord[0], $coord[1], 1, 0)
    Send( "Down" )
Until _IsPressed(20); The Spacebar key (20)

Exit

see that i have removed the sleep..

it stops when you press enter

alright, done

- me

Share this post


Link to post
Share on other sites

#include <Misc.au3>
Do
    $coord = PixelSearch( 0, 1, 1076, 691, 0xa62300 )
    If @error=0 Then MouseClick("right", $coord[0], $coord[1], 1, 0)
    Send( "Down" )
Until _IsPressed(20); The Spacebar key (20)
Exit

i try it but it repeat very fast. i want to make it reapeat in every 2 minute.please give me advice

like i said,

see that i have removed the sleep..

it stops when you press enter

I had removed your sleep command, just add the sleep command again,

note: the sleep command works in milliseconds, so if u want it to run every 2 minutes you should try this:

sleep(120*1000)

you must place this inside the loop,

Share this post


Link to post
Share on other sites

A long sleep like this will prevent you from terminating the application in a normal fashion as it blocks the app froom reading and removing messages in the message queue. You loosing messages as a result.

sleep(120*1000)oÝ÷ Ù*2¢ë!¢é]rì׫¶+^jxz¹h%yê_ºw-ÚºÚ"µÍ[ÈÛÔÛY
    ÌÍÜÊB   ÌÍÝ[YHH[Y[]

BÂÛY

H[[[YY  ÌÍÝ[YJH  ÝÏH   ÌÍÜÊL[[Â

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