Justcook90 Posted August 27, 2006 Share Posted August 27, 2006 ok here is what i got and i want it to set a color next to the Getpixle comand... i don't know how to enter the color please show me what camand to use. oh and color i want is a gray it is R82 G97 B123 or 52617B in hex and the second color is also a gray it is R66 G89 B99 or 425963 in hex.(more at bottom)=====================================================================#include <GuiConstants.au3>Opt("GUIOnEventMode",1)HotKeySet("{F5}", "_Start")HotKeySet("{ESC}","Terminate")$ClickIt = 0GUICreate("Auto-Potter", 200, 150)GUISetOnEvent($GUI_EVENT_CLOSE,"Terminate")$Checkbox_1 = GUICtrlCreateCheckbox("Auto-Pot HP", 20, 40, 150, 20)$Checkbox_2 = GUICtrlCreateCheckbox("Auto-Pot MP", 20, 80, 150, 20)GUISetState()While 1 Sleep( 10 )WEndExitFunc _Start () $ClickIt = 1 While $ClickIt = 1 If BitAND(GUICtrlRead($Checkbox_1), $GUI_CHECKED) = $GUI_CHECKED Then $correct_color = (first color) while 1 If $correct_color = PixelGetColor( 30, 736 ) Then Send('{F9}') Sleep(1500) EndIf WEnd Sleep(100) EndIf If BitAND(GUICtrlRead($Checkbox_2), $GUI_CHECKED) = $GUI_CHECKED Then $correct_color = (second color) while 1 If $correct_color = PixelGetColor( 52, 726 ) Then Send('{F8}') Sleep(1500) EndIf WEnd Sleep(100) EndIf WEndEndFunc ;==>_StartFunc Terminate () ExitEndFunc ;==>Terminate=====================================================================ok that is what i have, the part i want you to look at is in bold, also give me comments on things that would make this not work. I have the script attached. Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 27, 2006 Share Posted August 27, 2006 (edited) ok here is what i got and i want it to set a color next to the Getpixle comand... i don't know how to enter the color please show me what camand to use. oh and color i want is a gray it is R82 G97 B123 or 52617B in hex and the second color is also a gray it is R66 G89 B99 or 425963 in hex. (more at bottom) CODE===================================================================== #include <GuiConstants.au3> Opt("GUIOnEventMode",1) HotKeySet("{F5}", "_Start") HotKeySet("{ESC}","Terminate") $ClickIt = 0 GUICreate("Auto-Potter", 200, 150) GUISetOnEvent($GUI_EVENT_CLOSE,"Terminate") $Checkbox_1 = GUICtrlCreateCheckbox("Auto-Pot HP", 20, 40, 150, 20) $Checkbox_2 = GUICtrlCreateCheckbox("Auto-Pot MP", 20, 80, 150, 20) GUISetState() While 1 Sleep( 10 ) WEnd Exit Func _Start () $ClickIt = 1 While $ClickIt = 1 If BitAND(GUICtrlRead($Checkbox_1), $GUI_CHECKED) = $GUI_CHECKED Then $correct_color = (first color) while 1 If $correct_color = PixelGetColor( 30, 736 ) Then Send('{F9}') Sleep(1500) EndIf WEnd Sleep(100) EndIf If BitAND(GUICtrlRead($Checkbox_2), $GUI_CHECKED) = $GUI_CHECKED Then $correct_color = (second color) while 1 If $correct_color = PixelGetColor( 52, 726 ) Then Send('{F8}') Sleep(1500) EndIf WEnd Sleep(100) EndIf WEnd EndFunc ;==>_Start Func Terminate () Exit EndFunc ;==>Terminate ===================================================================== ok that is what i have, the part i want you to look at is in bold, also give me comments on things that would make this not work. I have the script attached. Just put "0x" in front of the value to indicate that it's hex: $correct_color = 0x52617B ; First color $correct_color = 0x425963 ; Second color P.S. Much easier to read code put between code or autoit tags (I put the quoted code in codebox tags, above). Edited August 27, 2006 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Justcook90 Posted August 27, 2006 Author Share Posted August 27, 2006 lol funny thing is i figured it out and was coming to show u the update but sombody replayed here is the finished macro so others can get it and use it as scraps and guilds for some of theres 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