Scorekeeper Posted June 9, 2005 Share Posted June 9, 2005 (edited) This is a bot to send certain text ever so many second. But the script sends the no. 15 for no reason instead of the desied text. Is it possible to make a gui input into a program. Plz help, its a weird problem. 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("{ESC}", "Terminate") opt("GUIOnEventMode", 1) GUICreate("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 Bot for Rose Online.", 40, 10, 180, 15) $3 = GUICtrlCreateLabel("2. Select desired 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("Bot by ScoreKeeper AKA Darren Willows !", 20, 295, 230, 15) $9 = GUICtrlCreateLabel("www.GamerzPlanet.net 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, "Send_Message") GUISetState(@SW_SHOW) While 1 Sleep(100) Wend Func Runbot() WinActivate("ROSE online") $Size = WinGetPos("ROSE online") $Width = $Size[2] $Height = $Size[3] Send_Message() EndFunc;==>Runbot Func Onabout() MsgBox(48,"Bot ", "Created by ScoreKeeper") EndFunc Func Send_Message() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Send("{ESC}") Case GUICtrlRead ($text) ConsoleWrite(GUICtrlRead($text) & @LF) Send($text) Send("{ENTER}") 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 TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Can anyone help and plz tell me what is wrong with the script i have made. Its doing my head in. Edited June 9, 2005 by Scorekeeper Fou-Lu - Bof4 "...Wouldst thou fight a god?" Link to comment Share on other sites More sharing options...
vbMark Posted June 9, 2005 Share Posted June 9, 2005 I think if you change Send($text) to Send (GUICtrlRead ($text)) that might be what you want. Link to comment Share on other sites More sharing options...
Scorekeeper Posted June 9, 2005 Author Share Posted June 9, 2005 i never thought of that. thanks man, i will try it when i get home. 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