Gillboss Posted May 6, 2008 Share Posted May 6, 2008 look at this: #include <GUIConstants.au3> HotKeySet("{F5}", "startbot") GUICreate("Combo", 540, 540, 100, 100) GUICtrlCreateLabel("Primary Skill", 20, 360, 90, 20) $PSkill = GUICtrlCreateCombo("", 170, 357, 30, 21) GUICtrlSetData($PSkill, "1|2|3|4|5|6|7|8|9", "1") GUICtrlCreateLabel("Secondary Skill", 20, 390, 90, 20) $SSkill = GUICtrlCreateCombo("", 170, 387, 30, 21) GUICtrlSetData($SSkill, "1|2|3|4|5|6|7|8|9", "2") GUISetState() While 1 Sleep(1000) WEnd Func startbot() $msg = GUIGetMsg() Sleep(2000) Send("Primary = "&$PSkill) Sleep(2000) Send("{ENTER}") Sleep(2000) Send("Secondary = "&$SSkill) Sleep(2000) EndFunc why, when i open notepad and press F5 the bot write wrong numbers and not what in the set data? (try to test yourself.. you will understand) thanks Link to comment Share on other sites More sharing options...
DexterMorgan Posted May 6, 2008 Share Posted May 6, 2008 look at this: #include <GUIConstants.au3> HotKeySet("{F5}", "startbot") GUICreate("Combo", 540, 540, 100, 100) GUICtrlCreateLabel("Primary Skill", 20, 360, 90, 20) $PSkill = GUICtrlCreateCombo("", 170, 357, 30, 21) GUICtrlSetData($PSkill, "1|2|3|4|5|6|7|8|9", "1") GUICtrlCreateLabel("Secondary Skill", 20, 390, 90, 20) $SSkill = GUICtrlCreateCombo("", 170, 387, 30, 21) GUICtrlSetData($SSkill, "1|2|3|4|5|6|7|8|9", "2") GUISetState() While 1 Sleep(1000) WEnd Func startbot() $msg = GUIGetMsg() Sleep(2000) Send("Primary = "&$PSkill) Sleep(2000) Send("{ENTER}") Sleep(2000) Send("Secondary = "&$SSkill) Sleep(2000) EndFunc why, when i open notepad and press F5 the bot write wrong numbers and not what in the set data? (try to test yourself.. you will understand) thanks I didnt try it yet but i thing you need to do GUIctrlread($pSkill) instead of $PSkill so it would look like this Send("Primary = "& guictrlread($PSkill)) code Link to comment Share on other sites More sharing options...
monoceres Posted May 6, 2008 Share Posted May 6, 2008 look at this: #include <GUIConstants.au3> HotKeySet("{F5}", "startbot") GUICreate("Combo", 540, 540, 100, 100) GUICtrlCreateLabel("Primary Skill", 20, 360, 90, 20) $PSkill = GUICtrlCreateCombo("", 170, 357, 30, 21) GUICtrlSetData($PSkill, "1|2|3|4|5|6|7|8|9", "1") GUICtrlCreateLabel("Secondary Skill", 20, 390, 90, 20) $SSkill = GUICtrlCreateCombo("", 170, 387, 30, 21) GUICtrlSetData($SSkill, "1|2|3|4|5|6|7|8|9", "2") GUISetState() While 1 Sleep(1000) WEnd Func startbot() $msg = GUIGetMsg() Sleep(2000) Send("Primary = "&$PSkill) Sleep(2000) Send("{ENTER}") Sleep(2000) Send("Secondary = "&$SSkill) Sleep(2000) EndFunc why, when i open notepad and press F5 the bot write wrong numbers and not what in the set data? (try to test yourself.. you will understand) thanksWhy are you using GUIGetMsg in your startbot func? That should be placed in the main loop. You need to use GUICtrlRead to get the data from the combo, otherwise it's just a control id. Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
DexterMorgan Posted May 6, 2008 Share Posted May 6, 2008 we all said it at like the same time lol We have SKILL code Link to comment Share on other sites More sharing options...
Gillboss Posted May 6, 2008 Author Share Posted May 6, 2008 (edited) Why are you using GUIGetMsg in your startbot func?That should be placed in the main loop.You need to use GUICtrlRead to get the data from the combo, otherwise it's just a control id. but i must it for other things... i have radio in the bot too...and i have hotkeys of start and pause... i must it.. if the user change data after the pause..?i must GUIGetMsg. Edited May 6, 2008 by Gillboss Link to comment Share on other sites More sharing options...
monoceres Posted May 6, 2008 Share Posted May 6, 2008 but i must it for other things... i have radio in the bot too...and i have hotkeys of start and pause... i must it.. if the user change data after the pause..?i must GUIGetMsg.Read up on OnEventMode instead, because it will look very messy and buggy otherwise. Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Gillboss Posted May 6, 2008 Author Share Posted May 6, 2008 where read on it..? i dont find it in Helpfile.. Link to comment Share on other sites More sharing options...
monoceres Posted May 6, 2008 Share Posted May 6, 2008 where read on it..? i dont find it in Helpfile..GUI Reference --> GUI OnEvent Mode Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
DexterMorgan Posted May 6, 2008 Share Posted May 6, 2008 GUICtrlSetOnEvent($controlID,"Func") code Link to comment Share on other sites More sharing options...
Gillboss Posted May 6, 2008 Author Share Posted May 6, 2008 (edited) where..? can u send me the source please..? edit: ty kkKrazy.. found..GUICtrlSetOnEvent in help file.. more edit..: why i need it? where insert it? Edited May 6, 2008 by Gillboss Link to comment Share on other sites More sharing options...
monoceres Posted May 6, 2008 Share Posted May 6, 2008 Please study this example: #include <GUIConstantsEx.au3> Opt("GUIOnEventMode",1) GUICreate("Testing OnEvent") $button=GUICtrlCreateButton("Click me",10,10,100,50) GUICtrlSetOnEvent($button,"_Buttonclicked") GUISetOnEvent($GUI_EVENT_CLOSE,"close") GUISetState() while 1 sleep(100) WEnd Func close () Exit EndFunc Func _Buttonclicked() MsgBox(0,"Click","You clicked me!") EndFunc Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Gillboss Posted May 6, 2008 Author Share Posted May 6, 2008 ok i learn and im know it now.. and why it can help me? Link to comment Share on other sites More sharing options...
DexterMorgan Posted May 6, 2008 Share Posted May 6, 2008 where..? can u send me the source please..?edit:ty kkKrazy.. found..GUICtrlSetOnEvent in help file..more edit..:why i need it? where insert it?Your welcome Hope your script comes out good!as for your second edit im too late:( code Link to comment Share on other sites More sharing options...
monoceres Posted May 6, 2008 Share Posted May 6, 2008 ok i learn and im know it now..and why it can help me?After defining all events you never have to think about them again, do whatever you want in your other functions and your GUI will still be responsive Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Gillboss Posted May 6, 2008 Author Share Posted May 6, 2008 but my bot work with hotkeys.. Link to comment Share on other sites More sharing options...
monoceres Posted May 6, 2008 Share Posted May 6, 2008 but my bot work with hotkeys..Then why use GUIGetMsg() Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Gillboss Posted May 6, 2008 Author Share Posted May 6, 2008 because it: Select Case $msg = $optEeNormal Case $msg = $optEePower Case $msg = $optSinPoint EndSelect Link to comment Share on other sites More sharing options...
monoceres Posted May 6, 2008 Share Posted May 6, 2008 because it: Select Case $msg = $optEeNormal Case $msg = $optEePower Case $msg = $optSinPoint EndSelectYou are reaaaaaally confusing. Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Gillboss Posted May 6, 2008 Author Share Posted May 6, 2008 well how can i check if the radio checked? Link to comment Share on other sites More sharing options...
monoceres Posted May 6, 2008 Share Posted May 6, 2008 (edited) well how can i check if the radio checked?Generate events for the checkboxes with GUICtrlSetOnEvent. Edited May 6, 2008 by monoceres Broken link? PM me and I'll send you the file! 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