BrookieDragon Posted May 1, 2008 Posted May 1, 2008 (edited) 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? Quote $i = 1Do if PixelGetColor(252,980) = "FFFFFF" Then Send ("o") Sleep(300) EndIf Send ("x") Sleep(200) Until $i = 2I usually just test this with notepad up to see whats being written. I have yet to get an "o". Edited May 1, 2008 by BrookieDragon
Uriziel01 Posted May 1, 2008 Posted May 1, 2008 (edited) pixelGetColor isnt returning hex value, you should change: if PixelGetColor(252,980) = "FFFFFF" Then to: if hex(PixelGetColor(252,980),6) = "FFFFFF" Then Edited May 1, 2008 by Uriziel01
BrookieDragon Posted May 1, 2008 Author Posted May 1, 2008 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? Uriziel01 said: pixelGetColor isnt returning hex value, you should change: if PixelGetColor(252,980) = "FFFFFF" Then to: if hex(PixelGetColor(252,980),6) = "FFFFFF" Then
Uriziel01 Posted May 2, 2008 Posted May 2, 2008 just get decimal value of color and use if PixelGetColor(252,980) = hex(716259,6) Then in this example you color value was 716259
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