Frit Posted March 18, 2006 Share Posted March 18, 2006 Hello again, people! I'm learning a lot of Autoit, but I'm still with some problems. Like this script: ;hotkeys HotKeySet("{ESC}", "ExitPrg") ;Gui's objects GuiCreate("Rot Bot by Frit", 100, 100) $radio = GuiCtrlCreateRadio("Ativar", 10, 10) GuiSetstate() ;Getting pixel color While 1 $rot = PixelGetcolor (985, 398) Wend ;testing radio to call start While 1 If GuiCtrlRead ($radio) = 1 Then Call ("Start") Wend ;Check if pixel color is 4329988(dec), click there, sleep 10 sec Func Start() While 1 If $rot = 4329988 Then MouseClick ("left", 985, 398) Sleep (10000) EndIf Wend EndFunc ;exiting Func ExitPrg() Exit EndFunc All I want it to do is to Check if the radio is marked, Check if there's the right color in the right place and click there. It seems to be all ok, but it doesn't works... Any help will be welcome! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 18, 2006 Moderators Share Posted March 18, 2006 Hello again, people! I'm learning a lot of Autoit, but I'm still with some problems. Like this script: ;hotkeys HotKeySet("{ESC}", "ExitPrg") ;Gui's objects GuiCreate("Rot Bot by Frit", 100, 100) $radio = GuiCtrlCreateRadio("Ativar", 10, 10) GuiSetstate() ;Getting pixel color While 1 $rot = PixelGetcolor (985, 398) Wend ;testing radio to call start While 1 If GuiCtrlRead ($radio) = 1 Then Call ("Start") Wend ;Check if pixel color is 4329988(dec), click there, sleep 10 sec Func Start() While 1 If $rot = 4329988 Then MouseClick ("left", 985, 398) Sleep (10000) EndIf Wend EndFunc ;exiting Func ExitPrg() Exit EndFunc All I want it to do is to Check if the radio is marked, Check if there's the right color in the right place and click there. It seems to be all ok, but it doesn't works... Any help will be welcome!I would suggest taking a look at the AutoIt tutorials provided for you by some of the users. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Valuater Posted March 18, 2006 Share Posted March 18, 2006 (edited) this has a great demo on pixelsearchhttp://www.autoitscript.com/forum/index.php?showtopic=21048#8) Edited March 18, 2006 by Valuater Link to comment Share on other sites More sharing options...
Vortex Posted March 18, 2006 Share Posted March 18, 2006 If GUICtrlRead($radio) = 1 Then .. your code goes here .. EndIf Just place this in your while and leave the pixelcolor getting out of their, if this is really only what you want. The radio checkbox seems to have a state of 4 when not checked and 1 when it is,.. i'm not 100% sure but its easy to find out with some msgBox's 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