SteveO Posted July 27, 2006 Posted July 27, 2006 Okay, i'm working on a guild wars bot and I want to make item pickups as checkboxes on the GUI so when the bot is run they can select to pickup that certain color item, so how would I go about making this Function run if the box is checked for it? Function Itempickwhite() $itemcoordB = PixelSearch(8, 90, 985, 630, 0xFFFFFF, 0) If Not @error Then MouseClick("left", $itemcoordB[0], $itemcoordB[1], 1) Send("{SPACE}") Sleep(3500) EndIf
Sardith Posted July 27, 2006 Posted July 27, 2006 expandcollapse popup#include <GUIConstants.au3> GUICreate("Item Picker upper", 150, 75) $checkbox1 = GUICtrlCreateCheckbox("Item color white", 10, 10, 100, 20) GUISetState () ; will display an dialog box with 1 checkbox ;Min/Max/Close GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents") GUISetOnEvent($GUI_EVENT_MINIMIZE, "SpecialEvents") GUISetOnEvent($GUI_EVENT_RESTORE, "SpecialEvents") ;State when ran GUISetState(@SW_SHOW) ;Options Opt("GUICoordMode",1) Opt("GUIResizeMode", 1) Opt("GUIOnEventMode", 1) Func SpecialEvents() Select Case @GUI_CTRLID = $GUI_EVENT_CLOSE sleep(100) Exit Case @GUI_CTRLID = $GUI_EVENT_MINIMIZE Case @GUI_CTRLID = $GUI_EVENT_RESTORE EndSelect EndFunc While 1 $msg = GUIGetMsg() If $msg = $checkbox1 Then Itempickwhite() Wend Func Itempickwhite() $itemcoordB = PixelSearch(8, 90, 985, 630, 0xFFFFFF, 0) If not @error Then MouseClick("left", $itemcoordB[0], $itemcoordB[1], 1) Send("{SPACE}") Sleep(3500) EndIf EndFunc You were a little vage about what you wanted. Also your funcation above isn't right at all, but I made the needed corrections. If you can be a little clear on what you need id be more then happy to help. [font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]
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