lilandywandy Posted May 24, 2005 Share Posted May 24, 2005 " when 600,500 is black, right click at 400,400; if 600,500 is not black then stay idle" i want it so that everytime 600,500 is black it right clicks Link to comment Share on other sites More sharing options...
buzz44 Posted May 24, 2005 Share Posted May 24, 2005 (edited) Easy...While 1 If PixelGetColor(600,500) = 0 Then MouseClick("Right",400,400) EndIf WendI just wrote that right here in the reply so it may have an error.Edit: Just tested, it works fine . Edited May 24, 2005 by Burrup qq Link to comment Share on other sites More sharing options...
lilandywandy Posted May 24, 2005 Author Share Posted May 24, 2005 While 1 If PixelGetColor(122,744) = 848A84 Then Send("{F11}") Send("{F3}") Sleep(11000) Send("{F5}") Send("{F11}") EndIf Wend well this is what i kinda wanna do but its not working? Link to comment Share on other sites More sharing options...
buzz44 Posted May 24, 2005 Share Posted May 24, 2005 (edited) While 1 If PixelGetColor(122,744) = 848A84 Then Send("{F11}") Send("{F3}") Sleep("11000") Send("{F5}") Send("{F11}") EndIf Wend You were missing quotation marks around 11000, other then that the above should work, unless you have the colour wrong anf it never fins it in the first place. Edited May 24, 2005 by Burrup qq Link to comment Share on other sites More sharing options...
lilandywandy Posted May 24, 2005 Author Share Posted May 24, 2005 this is exactly what i have: HotKeySet("{PAUSE}", "mExit") MouseClick("left", 564, 108, 1) While 1 If PixelGetColor(122,744) = 848A84 Then Send("{F11}") Send("{F3}") Sleep("11000") Send("{F5}") Send("{F11}") EndIf Wend Func mExit() Exit EndFunc and thats what happens Link to comment Share on other sites More sharing options...
DaleHohm Posted May 24, 2005 Share Posted May 24, 2005 While 1 If PixelGetColor(122,744) = 848A84 Then Send("{F11}") Send("{F3}") Sleep("11000") Send("{F5}") Send("{F11}") EndIf WendYou were missing quotation marks around 11000, other then that the above should work, unless you have the colour wrong anf it never fins it in the first place.<{POST_SNAPBACK}>I found it needed quotes too, but around the color value rather than the sleep time...While 1 If (PixelGetColor(122, 744) = "848A84") Then Send("{F11}") Send("{F3}") Sleep(11000) Send("{F5}") Send("{F11}") EndIf WEnd Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
buzz44 Posted May 24, 2005 Share Posted May 24, 2005 (edited) PixelGetColor() returns the decimal value of the colour... either use the decimal value of it or use this...HotKeySet("{PAUSE}", "mExit") MouseClick("left", 564, 108, 1) While 1 If PixelGetColor(122,744) = Dec("848A84") Then Send("{F11}") Send("{F3}") Sleep(11000) Send("{F5}") Send("{F11}") EndIf Wend Func mExit() Exit EndFuncEdit: Yeah, my bad. When I first read it I got the Sleep() mixed up with a Send() and didn't realise that the colour was Hexadecimal. Use DaleHohm's code above. Edited May 24, 2005 by Burrup qq Link to comment Share on other sites More sharing options...
lilandywandy Posted May 24, 2005 Author Share Posted May 24, 2005 thanks alot i got it to work now =D Link to comment Share on other sites More sharing options...
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