Sobiech Posted August 12, 2009 Posted August 12, 2009 Hi allI have next problem (why again )look at my scriptexpandcollapse popup#include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=C:\Documents and Settings\Admin\Pulpit\GUI\Forms\First GUI.kxf $Form1 = GUICreate("Form1", 507, 330, 317, 220) $ExitButton = GUICtrlCreateButton("Exit", 320, 277, 161, 33, $WS_GROUP) $StartButton = GUICtrlCreateButton("Start", 40, 277, 161, 33, $WS_GROUP) $Combo1 = GUICtrlCreateCombo("Here is your bws :) GL & HF", 328, 229, 161, 25) GUICtrlSetData(-1, "4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26") $Pic1 = GUICtrlCreatePic("C:\Documents and Settings\Admin\Moje dokumenty\Moje obrazy\Satan\BotScreen.jpg", 0, -19, 524, 348, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $Button3 = GUICtrlCreateButton("Set your MP3 when bws end", 328, 197, 163, 25, $WS_GROUP) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Opt("GUIOnEventMode", 1) ; Change to OnEvent mode GUISetOnEvent($GUI_EVENT_CLOSE, "ExitButton") GUICtrlSetOnEvent($StartButton, "StartButton") GUICtrlSetOnEvent($Exitbutton, "ExitButton") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Combo1 EndSwitch WEnd Func StartButton() Opt("MouseCoordMode", 2) For $i = 0 to $Combo1 Step +1 WinActivate("Diablo II") Sleep(1000) MouseClick("right", 535, 235, 1) Sleep(100) Send("{Enter}") Sleep(100) Send("1") Sleep(100) Send("{Enter}") Next EndFuncThis is Diablo II Bone Waller >_<I want enter number to repeat my loopThe number must be from $combo1 or something like this, anyway numer must be entered in GUI Like as below in combo box is 3 so Func StartButton() run three times I try explain exactly what i want.Thx for all who view this topic This world is crazy
Scriptonize Posted August 12, 2009 Posted August 12, 2009 Change your function into: Func StartButton() Opt("MouseCoordMode", 2) $Combo1_Value = GUICtrlRead($Combo1) For $i = 1 to $Combo1_Value WinActivate("Diablo II") Sleep(1000) MouseClick("right", 535, 235, 1) Sleep(100) Send("{Enter}") Sleep(100) Send("1") Sleep(100) Send("{Enter}") Next EndFunc That should do the trick. If you learn from It, it's not a mistake
Sobiech Posted August 12, 2009 Author Posted August 12, 2009 Change your function into: Func StartButton() Opt("MouseCoordMode", 2) $Combo1_Value = GUICtrlRead($Combo1) For $i = 1 to $Combo1_Value WinActivate("Diablo II") Sleep(1000) MouseClick("right", 535, 235, 1) Sleep(100) Send("{Enter}") Sleep(100) Send("1") Sleep(100) Send("{Enter}") Next EndFunc That should do the trick. Its work >_< Thx men This world is crazy
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