qwqwwqwdwd Posted January 24, 2007 Posted January 24, 2007 $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
Immensee Posted January 24, 2007 Posted January 24, 2007 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
Immensee Posted January 24, 2007 Posted January 24, 2007 #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 advicelike i said,see that i have removed the sleep..it stops when you press enterI 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,
Uten Posted January 24, 2007 Posted January 24, 2007 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ì׫¶+y«^jxz¹h%yê_ºw-ÚºÚ"µÍ[ÈÛÔÛY ÌÍÜÊB ÌÍÝ[YHH[Y[] BÂÛY H[[[YY ÌÍÝ[YJH ÝÏH ÌÍÜÊL[[ Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now