Jump to content

Recommended Posts

sorry im kinda new to autoit. Here is my script i got a question.... is it coded right and everything.

While 1
If PixelGetColor(370, 702) = 10790050 & Not PixelGetColor(413, 700) = 2895906 then
Send("{space}")
endif
sleep(1)
Wend
Link to post
Share on other sites

sorry im kinda new to autoit. Here is my script i got a question.... is it coded right and everything.

The correct syntax for your script would be:

While 1
   If PixelGetColor(370, 702) = 10790050 AND PixelGetColor(413, 700) <> 2895906 then
      Send("{space}")
   endif
   sleep(1)
Wend

But, just sendind a SPACE message would probably be not enough, as you

don't know which window has the focus. Better bring the desired window in

front with WinActivate() - see help file for the syntax.

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to post
Share on other sites

The correct syntax for your script would be:

While 1
   If PixelGetColor(370, 702) = 10790050 AND PixelGetColor(413, 700) <> 2895906 then
      Send("{space}")
   endif
   sleep(1)
Wend

But, just sendind a SPACE message would probably be not enough, as you

don't know which window has the focus. Better bring the desired window in

front with WinActivate() - see help file for the syntax.

Cheers

Kurt

<{POST_SNAPBACK}>

thanks, worked now the script doesent loop fastest enough i need to to check faster how could i do this?
Link to post
Share on other sites
  • Developers

theres no other tequneek or anythign at all i can do?

<{POST_SNAPBACK}>

make the send speed faster ?? ... check OPT("SendKeyDelay",1)

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 post
Share on other sites

Opt("SendKeyDelay", "5") is the default for AutoIt (5 milliseconds).

From the Help File

Alters the the length of the brief pause in between sent keystrokes.

Time in milliseconds to pause (default=5). Sometimes a value of 0 does not work; use 1 instead.

Try putting the following line at the very top of the script:

Opt("SendKeyDelay", "1")

Writing AutoIt scripts since

_DateAdd("d", -2, _NowCalcDate())
Link to post
Share on other sites

Opt("SendKeyDelay", "5") is the default for AutoIt (5 milliseconds).

From the Help File

Try putting the following line at the very top of the script:

Opt("SendKeyDelay", "1")

<{POST_SNAPBACK}>

nice thanks any other way i can speed it up?
Link to post
Share on other sites

Not through Opts() and cleaning code usually doesn't speed it up too much more...I don't think you can clean yours up anymore than it already is...maybe take out the sleep() command

Writing AutoIt scripts since

_DateAdd("d", -2, _NowCalcDate())
Link to post
Share on other sites

Not through Opts() and cleaning code usually doesn't speed it up too much more...I don't think you can clean yours up anymore than it already is...maybe take out the sleep() command

<{POST_SNAPBACK}>

That acutally may be counterproductive as the CPU use would zoom to 100% and bog down.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...