Jump to content
Sign in to follow this  

If Then with GetPixel fail?

Recommended Posts

OK, I'm trying to create a script exit via opening the Windows start menu (vista) and matching the white in the info box there.

Basically...have the script running, running, running, hit the windows key, start menu opens, white background of the recently used programs list is shown, script stops. (got stuck in a few infinite loops earlier where I had no control over the mouse to manually close the script)

I made a little test script to work on this, but for the life of me, I can not get this to work. Anyone see anything blaring'ly wrong?

$i = 1


if PixelGetColor(252,980) = "FFFFFF" Then

Send ("o")



Send ("x")


Until $i = 2

I usually just test this with notepad up to see whats being written. I have yet to get an "o". Edited by BrookieDragon

Share this post

Link to post
Share on other sites

Thanks much, I was thinking my problem was with that. Cause all the script samples used something other then what the Autoit windows info tool was returning.

Is there an easy way to get hex using the window tool?

pixelGetColor isnt returning hex value, you should change:

if PixelGetColor(252,980) = "FFFFFF" Then


if hex(PixelGetColor(252,980),6) = "FFFFFF" Then


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  

  • Create New...