Scorekeeper Posted June 6, 2005 Share Posted June 6, 2005 How would you make a gui bot be paused until you click the button to enter the game. cause i use this portion of the script $variable = GUICtrlCreateEdit("default text to be shown", 10, 10, 280, 50) . . . . . While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Send("{ESC}") Case GUICtrlRead ($variable) ConsoleWrite(GUICtrlRead($variable) & @LF) Send("$variable") EndSelect _Sleep() WEnd But my bot spams the text on my bot. How to stop. Plz help. Fou-Lu - Bof4 "...Wouldst thou fight a god?" Link to comment Share on other sites More sharing options...
Valuater Posted June 6, 2005 Share Posted June 6, 2005 give this try ; Press Esc to terminate script, Pause/Break to "pause", shift-s to send message Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("+s", "Send_Message") ;Shift-s ; set to what ever you want ;;;; Body of program would go here ;;;; While 1 Sleep(100) WEnd ;;;;;;;; Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func Send_Message() GUICtrlRead ($variable) ConsoleWrite(GUICtrlRead($variable) & @LF) ControlSend ( "title", "text", controlID, "string" [, flag] ) ; string = $variable EndFunc ***** and from help ControlSend ( "title", "text", controlID, "string" [, flag] ) Parameters title The title of the window to access. text The text of the window to access. controlID The control to interact with. See Controls. string String of characters to send to the control. flag [optional] Changes how "keys" is processed: flag = 0 (default), Text contains special characters like + to indicate SHIFT and {LEFT} to indicate left arrow. flag = 1, keys are sent raw. Return Value Success: Returns 1. Failure: Returns 0 if window/control is not found. Remarks ControlSend works in a similar way to Send but it can send key strokes directly to a window, rather than just to the active window. ************ all from help **************** Link to comment Share on other sites More sharing options...
Valuater Posted June 6, 2005 Share Posted June 6, 2005 But my bot spams the text on my bot. How to stop. Plz help. **** beacause of this Send("$variable") ......................... You need something like this ControlSend ( "Rose Online ???", "welcome to Rose Online ???", "", $variable) i dont know what else to say............ sorry Link to comment Share on other sites More sharing options...
buzz44 Posted June 7, 2005 Share Posted June 7, 2005 (edited) Your not telling it to do anything. I believe someone else answered this for you aswell. Currently its just creating every thing then... blank... then exit. You need to fill the blank with a loop. Add this at the top of your first function. While Sleep(100) Wend Edited June 7, 2005 by Burrup qq Link to comment Share on other sites More sharing options...
Scorekeeper Posted June 8, 2005 Author Share Posted June 8, 2005 Thanks for all your help. but i have a really weird problem. with the code Func text() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Send("{ESC}") Case GUICtrlRead ($text) ConsoleWrite(GUICtrlRead($text) & @LF) Send($text) EndSelect _Sleep() WEnd EndFunc It sends 15 to the game. But if i use Func Send_Message() GUICtrlRead ($text) ConsoleWrite(GUICtrlRead($text) & @LF) ControlSend ( "ROSE online", "ROSE online", "+s", $text); string = $variable EndFunc It send the inputed text but not to the game just to the bot. Here is the full code. expandcollapse popupDim $spam, $Runbot, $about $currentColor = 0 $count = 0 #include <GUIConstants.au3> FileInstall("C:\Program Files\RoseBots\Images\Background.jpg", "C:\Program Files\RoseBots\Images\Background.jpg") Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("+s", "Send_Message");Shift-s; set to what ever you want HotKeySet("{ESC}", "Terminate") opt("GUIOnEventMode", 1) GUICreate("Spam Bot© By ScoreKeeper", 400, 335) GUISetBkColor(6119597) GUICtrlCreatePic("C:\Program Files\RoseBots\Images\Background.jpg", 0, 0, 400, 335, $WS_EX_TRANSPARENT) $10 = GUICtrlCreateLabel("1. Login to ROSE and Alt-Tab back here.", 20, 70, 195, 15) $1 = GUICtrlCreateLabel("This is a Spam Bot for Rose Online.", 40, 10, 180, 15) $3 = GUICtrlCreateLabel("2. Select desired Spam Text.", 20, 85, 210, 15) $4 = GUICtrlCreateLabel("4. Click Run Bot.", 20, 145, 90, 15) $6 = GUICtrlCreateLabel("The Esc button will exit the script.", 20, 250, 160, 15) $7 = GUICtrlCreateLabel("The Pause button will pause the script.", 20, 265, 185, 15) $8 = GUICtrlCreateLabel("Spam Bot by ScoreKeeper AKA Darren Willows !", 20, 295, 230, 15) $9 = GUICtrlCreateLabel("www.GamerzPlanet.net Copyright© 2005", 20, 310, 200, 15) GUICtrlSetColor($10, 16768341) GUICtrlSetColor($1, 16768341) GUICtrlSetColor($3, 16768341) GUICtrlSetColor($4, 16768341) GUICtrlSetColor($6, 16768341) GUICtrlSetColor($7, 16768341) GUICtrlSetColor($8, 16768341) GUICtrlSetColor($9, 16768341) $sleep = GUICtrlCreateCombo( "0.2 second", 150, 120, 80) GUICtrlSetData(-1, "0.5 seconds") GUICtrlSetData(-2, "1 seconds") GUICtrlSetData(-3, "2 seconds") GUICtrlSetData(-4, "4 seconds") GUICtrlSetData(-5, "6 seconds") GUICtrlSetData(-6, "8 seconds") GUICtrlSetData(-7, "10 seconds") GUICtrlSetData(-8, "12 seconds") GUICtrlSetData(-9, "14 seconds") $Runbot = GUICtrlCreateButton("Run bot", 20, 180, 75) GUICtrlSetOnEvent($Runbot, "Runbot") $about = GUICtrlCreateButton ( "About", 315, 220, 75) GUICtrlSetOnEvent($about, "Onabout") $text = GUICtrlCreateInput ( "Please Input Text.", 40, 30, 250, 20) GUICtrlSetOnEvent($text, "text") GUISetState(@SW_SHOW) While 1 Sleep(100) Wend Func Runbot() WinActivate("ROSE online") $Size = WinGetPos("ROSE online") $Width = $Size[2] $Height = $Size[3] text() EndFunc ;==>Runbot Func Onabout() MsgBox(48,"Spam Bot© ", "Created by ScoreKeeper" & @CRLF & "Copyright© 2005.") EndFunc Func text() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Send("{ESC}") Case GUICtrlRead ($text) ConsoleWrite(GUICtrlRead($text) & @LF) Send($text) EndSelect _Sleep() WEnd EndFunc Func _Sleep() Select Case GUICtrlRead($sleep) = "0.2 second" ConsoleWrite(GUICtrlRead($sleep) & @LF) Sleep(200) Case GUICtrlRead($sleep) = "0.5 second" ConsoleWrite(GUICtrlRead($sleep) & @LF) Sleep(500) Case GUICtrlRead($sleep) = "1 second" ConsoleWrite(GUICtrlRead($sleep) & @LF) Sleep(1000) Case GUICtrlRead($sleep) = "2 seconds" ConsoleWrite(GUICtrlRead($sleep) & @LF) Sleep(2000) Case GUICtrlRead($sleep) = "4 seconds" ConsoleWrite(GUICtrlRead($sleep) & @LF) Sleep(4000) Case GUICtrlRead($sleep) = "6 seconds" ConsoleWrite(GUICtrlRead($sleep) & @LF) Sleep(6000) Case GUICtrlRead($sleep) = "8 seconds" ConsoleWrite(GUICtrlRead($sleep) & @LF) Sleep(8000) Case GUICtrlRead($sleep) = "10 seconds" ConsoleWrite(GUICtrlRead($sleep) & @LF) Sleep(10000) Case GUICtrlRead($sleep) = "12 seconds" ConsoleWrite(GUICtrlRead($sleep) & @LF) Sleep(12000) Case GUICtrlRead($sleep) = "14 seconds" ConsoleWrite(GUICtrlRead($sleep) & @LF) Sleep(14000) EndSelect EndFunc Func Send_Message() GUICtrlRead ($text) ConsoleWrite(GUICtrlRead($text) & @LF) ControlSend ( "ROSE online", "ROSE online", "+s", $text); string = $variable EndFunc Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Fou-Lu - Bof4 "...Wouldst thou fight a god?" Link to comment Share on other sites More sharing options...
Scorekeeper Posted June 9, 2005 Author Share Posted June 9, 2005 Come on people. can you plz help me do this. i do apreciate it. thanks, im still a learner. Fou-Lu - Bof4 "...Wouldst thou fight a god?" 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