Jump to content

Recommended Posts

Posted

I have searched the site but can not find anything as im a newb. lol.

The bot wont press f2 or f1 then sleep.

here is a portion of the script.

The code for the set data.

$button = GUICtrlcreatecombo( "F1", 20, 120, 100)
GUICtrlSetData(-1,"F2")
GUICtrlSetData(-2,"F3")
GUICtrlSetData(-3,"F4")
GUICtrlSetData(-4,"F5")
GUICtrlSetData(-5,"F6")
GUICtrlSetData(-6,"F7")
GUICtrlSetData(-7,"F8")

$sleep = GUICtrlcreatecombo( "1 second", 150, 120, 80)
GUICtrlSetData(-1,"2 seconds")
GUICtrlSetData(-2,"4 seconds")
GUICtrlSetData(-3,"6 seconds")
GUICtrlSetData(-4,"8 seconds")
GUICtrlSetData(-5,"10 seconds")
GUICtrlSetData(-6,"12 seconds")
GUICtrlSetData(-7,"14 seconds")

And the code for the do if set data is.

$Loop = 1
  While $Loop = 1

If GUICtrlRead($button) = "F1" Then
Send("{F1}")    
EndIf
If GUICtrlRead($sleep) = "1 second" Then
Sleep (1000)    
EndIf
If GUICtrlRead($sleep) = "2 seconds" Then
Sleep (2000)
EndIf
If GUICtrlRead($sleep) = "4 seconds" Then
Sleep (4000)    
EndIf
If GUICtrlRead($sleep) = "6 seconds" Then
Sleep (6000)    
EndIf
If GUICtrlRead($sleep) = "8 seconds" Then
Sleep (8000)    
EndIf
If GUICtrlRead($sleep) = "10 seconds" Then
Sleep (10000)   
EndIf
If GUICtrlRead($sleep) = "12 seconds" Then
Sleep (12000)
EndIf 
If GUICtrlRead($sleep) = "14 seconds" Then
Sleep (14000)   
EndIf

There is more of the code but it is not relevant.

Plz help as i have been stuck with this problem for a WEEK really i have.

Thanks.

Fou-Lu - Bof4 "...Wouldst thou fight a god?"
Posted (edited)

with out all the code, made quick gui and put the code in with consolwrites to see what is happening seems to be working to me

#include <GuiConstants.au3>

GUICreate("MyGUI", 392, 322)

$button = GUICtrlCreateCombo( "F1", 20, 120, 100)
GUICtrlSetData(-1, "F2")
GUICtrlSetData(-2, "F3")
GUICtrlSetData(-3, "F4")
GUICtrlSetData(-4, "F5")
GUICtrlSetData(-5, "F6")
GUICtrlSetData(-6, "F7")
GUICtrlSetData(-7, "F8")

$sleep = GUICtrlCreateCombo( "1 second", 150, 120, 80)
GUICtrlSetData(-1, "2 seconds")
GUICtrlSetData(-2, "4 seconds")
GUICtrlSetData(-3, "6 seconds")
GUICtrlSetData(-4, "8 seconds")
GUICtrlSetData(-5, "10 seconds")
GUICtrlSetData(-6, "12 seconds")
GUICtrlSetData(-7, "14 seconds")

GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case Else
            If GUICtrlRead($button) = "F1" Then
                ConsoleWrite(GUICtrlRead($button) & @LF)
                Send("{F1}")
            EndIf
            If GUICtrlRead($sleep) = "1 second" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(1000)
            EndIf
            If GUICtrlRead($sleep) = "2 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(2000)
            EndIf
            If GUICtrlRead($sleep) = "4 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(4000)
            EndIf
            If GUICtrlRead($sleep) = "6 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(6000)
            EndIf
            If GUICtrlRead($sleep) = "8 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(8000)
            EndIf
            If GUICtrlRead($sleep) = "10 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(10000)
            EndIf
            If GUICtrlRead($sleep) = "12 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(12000)
            EndIf
            If GUICtrlRead($sleep) = "14 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(14000)
            EndIf
    EndSelect
WEnd
Exit

Edit:

I guess the questions is, are you sending F1 to the gui or another app/script?

If wanting to send to another app/script do a WinActivate then send?

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Posted

I just added a "GUI" and a "Wend at the bottom of your code....

it was working

However, it was sending "F1" to the active window the "GUI" i made and there is no responce to my GUI

When I made another widndow active it worked fine

good luck

NEWHeader1.png

Posted

This is my new script to spam the Fx command every x seconds.

But i does not seen to work.

The bot runs but does not do anything at all.

This bot is for a game called rose online.

Any help is apreciated.

;*********************************************|Variables Defined|*********************************************  
Dim $Width, $Height, $pixel, $Counter, $variable,$Cancelx, $Cancely, $Casiox, $Casioy, $pixelColor, $Sleep1, $Sleep2, $Channel1x, $Channel1y, $Channel2x, $Channel2y, $Channel3x, $Channel3y, $Runbot, $button 
$currentColor = 0
$count = 0  
;*********************************************|Variables Defined|*********************************************

;*********************************************|GUI|*********************************************
    #include <GUIConstants.au3>
Fileinstall("C:\Program Files\RoseBots\Images\Background.jpg","C:\Program Files\RoseBots\Images\Background.jpg")
Global $Paused
HotKeySet("{ESC}", "EndScript")
Opt("GUIOnEventMode",1)
GUICreate ( "Gather Bot© By ScoreKeeper", 400,335)
GUISetBKcolor(6119597)
GUICtrlCreatePic("C:\Program Files\RoseBots\Images\Background.jpg",0,0,400,335,$WS_EX_TRANSPARENT) 
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
$10 = GUICtrlCreateLabel ( "1. Login to ROSE and Alt-Tab back here.", 20, 70, 195, 15)
$1 = GUICtrlCreateLabel ( "This is a Gather Bot for Rose Online.", 40, 10, 180, 15)
$3 = GUICtrlCreateLabel ( "2. Select desired Gather Key and time delay.", 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 ( "Gather 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)
$button = GUICtrlcreatecombo( "F1", 20, 120, 100)
GUICtrlSetData(-1,"F2")
GUICtrlSetData(-2,"F3")
GUICtrlSetData(-3,"F4")
GUICtrlSetData(-4,"F5")
GUICtrlSetData(-5,"F6")
GUICtrlSetData(-6,"F7")
GUICtrlSetData(-7,"F8")
;*********************************************|GUI|*********************************************

$sleep = GUICtrlcreatecombo( "1 second", 150, 120, 80)
GUICtrlSetData(-1,"2 seconds")
GUICtrlSetData(-2,"4 seconds")
GUICtrlSetData(-3,"6 seconds")
GUICtrlSetData(-4,"8 seconds")
GUICtrlSetData(-5,"10 seconds")
GUICtrlSetData(-6,"12 seconds")
GUICtrlSetData(-7,"14 seconds")


$Runbot = GUICtrlCreateButton ( "Run bot", 20, 180, 75)
GUICtrlSetOnEvent($Runbot,"Runbot")

GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then Send("{ESC}")
    Wend
    
Func Pause()
    $Paused = NOT $Paused
    While $Paused
        sleep(1)
        ToolTip(' Bot is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc




Func Runbot()
    WinActivate("ROSE online")
    $Size = WinGetPos("ROSE online")
        $Width = $Size[2]
    $Height = $Size[3]
    EndFunc

  
;*********************************************|F1|*********************************************
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case Else
            If GUICtrlRead($button) = "F1" Then
                ConsoleWrite(GUICtrlRead($button) & @LF)
                Send("{F1}")
            EndIf
            If GUICtrlRead($sleep) = "1 second" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(1000)
            EndIf
            If GUICtrlRead($sleep) = "2 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(2000)
            EndIf
            If GUICtrlRead($sleep) = "4 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(4000)
            EndIf
            If GUICtrlRead($sleep) = "6 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(6000)
            EndIf
            If GUICtrlRead($sleep) = "8 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(8000)
            EndIf
            If GUICtrlRead($sleep) = "10 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(10000)
            EndIf
            If GUICtrlRead($sleep) = "12 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(12000)
            EndIf
            If GUICtrlRead($sleep) = "14 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(14000)
            EndIf
                EndSelect
            WEnd
            
;*********************************************|F2|*********************************************
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case Else
            If GUICtrlRead($button) = "F2" Then
                ConsoleWrite(GUICtrlRead($button) & @LF)
                Send("{F2}")
            EndIf
            If GUICtrlRead($sleep) = "1 second" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(1000)
            EndIf
            If GUICtrlRead($sleep) = "2 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(2000)
            EndIf
            If GUICtrlRead($sleep) = "4 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(4000)
            EndIf
            If GUICtrlRead($sleep) = "6 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(6000)
            EndIf
            If GUICtrlRead($sleep) = "8 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(8000)
            EndIf
            If GUICtrlRead($sleep) = "10 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(10000)
            EndIf
            If GUICtrlRead($sleep) = "12 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(12000)
            EndIf
            If GUICtrlRead($sleep) = "14 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(14000)
            EndIf
                EndSelect
WEnd

;*********************************************|F3|*********************************************
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case Else
            If GUICtrlRead($button) = "F3" Then
                ConsoleWrite(GUICtrlRead($button) & @LF)
                Send("{F3}")
            EndIf
            If GUICtrlRead($sleep) = "1 second" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(1000)
            EndIf
            If GUICtrlRead($sleep) = "2 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(2000)
            EndIf
            If GUICtrlRead($sleep) = "4 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(4000)
            EndIf
            If GUICtrlRead($sleep) = "6 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(6000)
            EndIf
            If GUICtrlRead($sleep) = "8 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(8000)
            EndIf
            If GUICtrlRead($sleep) = "10 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(10000)
            EndIf
            If GUICtrlRead($sleep) = "12 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(12000)
            EndIf
            If GUICtrlRead($sleep) = "14 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(14000)
            EndIf
                EndSelect
WEnd

;*********************************************|F4|*********************************************
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case Else
            If GUICtrlRead($button) = "F4" Then
                ConsoleWrite(GUICtrlRead($button) & @LF)
                Send("{F4}")
            EndIf
            If GUICtrlRead($sleep) = "1 second" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(1000)
            EndIf
            If GUICtrlRead($sleep) = "2 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(2000)
            EndIf
            If GUICtrlRead($sleep) = "4 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(4000)
            EndIf
            If GUICtrlRead($sleep) = "6 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(6000)
            EndIf
            If GUICtrlRead($sleep) = "8 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(8000)
            EndIf
            If GUICtrlRead($sleep) = "10 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(10000)
            EndIf
            If GUICtrlRead($sleep) = "12 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(12000)
            EndIf
            If GUICtrlRead($sleep) = "14 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(14000)
            EndIf
                EndSelect
WEnd

;*********************************************|F5|*********************************************
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case Else
            If GUICtrlRead($button) = "F5" Then
                ConsoleWrite(GUICtrlRead($button) & @LF)
                Send("{F5}")
            EndIf
            If GUICtrlRead($sleep) = "1 second" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(1000)
            EndIf
            If GUICtrlRead($sleep) = "2 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(2000)
            EndIf
            If GUICtrlRead($sleep) = "4 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(4000)
            EndIf
            If GUICtrlRead($sleep) = "6 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(6000)
            EndIf
            If GUICtrlRead($sleep) = "8 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(8000)
            EndIf
            If GUICtrlRead($sleep) = "10 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(10000)
            EndIf
            If GUICtrlRead($sleep) = "12 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(12000)
            EndIf
            If GUICtrlRead($sleep) = "14 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(14000)
            EndIf
                EndSelect
WEnd

;*********************************************|F6|*********************************************
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case Else
            If GUICtrlRead($button) = "F6" Then
                ConsoleWrite(GUICtrlRead($button) & @LF)
                Send("{F6}")
            EndIf
            If GUICtrlRead($sleep) = "1 second" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(1000)
            EndIf
            If GUICtrlRead($sleep) = "2 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(2000)
            EndIf
            If GUICtrlRead($sleep) = "4 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(4000)
            EndIf
            If GUICtrlRead($sleep) = "6 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(6000)
            EndIf
            If GUICtrlRead($sleep) = "8 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(8000)
            EndIf
            If GUICtrlRead($sleep) = "10 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(10000)
            EndIf
            If GUICtrlRead($sleep) = "12 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(12000)
            EndIf
            If GUICtrlRead($sleep) = "14 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(14000)
            EndIf
                EndSelect
WEnd


;*********************************************|F7|*********************************************
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case Else
            If GUICtrlRead($button) = "F7" Then
                ConsoleWrite(GUICtrlRead($button) & @LF)
                Send("{F7}")
            EndIf
            If GUICtrlRead($sleep) = "1 second" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(1000)
            EndIf
            If GUICtrlRead($sleep) = "2 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(2000)
            EndIf
            If GUICtrlRead($sleep) = "4 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(4000)
            EndIf
            If GUICtrlRead($sleep) = "6 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(6000)
            EndIf
            If GUICtrlRead($sleep) = "8 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(8000)
            EndIf
            If GUICtrlRead($sleep) = "10 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(10000)
            EndIf
            If GUICtrlRead($sleep) = "12 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(12000)
            EndIf
            If GUICtrlRead($sleep) = "14 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(14000)
            EndIf
                EndSelect
WEnd


;*********************************************|F8|*********************************************
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case Else
            If GUICtrlRead($button) = "F8" Then
                ConsoleWrite(GUICtrlRead($button) & @LF)
                Send("{F8}")
            EndIf
            If GUICtrlRead($sleep) = "1 second" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(1000)
            EndIf
            If GUICtrlRead($sleep) = "2 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(2000)
            EndIf
            If GUICtrlRead($sleep) = "4 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(4000)
            EndIf
            If GUICtrlRead($sleep) = "6 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(6000)
            EndIf
            If GUICtrlRead($sleep) = "8 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(8000)
            EndIf
            If GUICtrlRead($sleep) = "10 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(10000)
            EndIf
            If GUICtrlRead($sleep) = "12 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(12000)
            EndIf
            If GUICtrlRead($sleep) = "14 seconds" Then
                ConsoleWrite(GUICtrlRead($sleep) & @LF)
                Sleep(14000)
            EndIf
                EndSelect
WEnd



  
  Func CLOSEClicked()
exit
EndFunc
Func EndScript()
Exit
EndFunc

Thanks if you can help.

Fou-Lu - Bof4 "...Wouldst thou fight a god?"
Posted (edited)

This should get you a little closer, but it will be sending the functions to this gui

you'll have to figure out how to send the functions to another app.

;*********************************************|Variables Defined|*********************************************
Dim $Width, $Height, $pixel, $Counter, $variable, $Cancelx, $Cancely, $Casiox, $Casioy, $pixelColor, $Sleep1, $Sleep2, $Channel1x, $Channel1y, $Channel2x, $Channel2y, $Channel3x, $Channel3y, $Runbot, $button
$currentColor = 0
$count = 0
;*********************************************|Variables Defined|*********************************************

;*********************************************|GUI|*********************************************
#include <GUIConstants.au3>
FileInstall("C:\Program Files\RoseBots\Images\Background.jpg", "C:\Program Files\RoseBots\Images\Background.jpg")
Global $Paused
HotKeySet("{ESC}", "EndScript")
opt("GUIOnEventMode", 1)
GUICreate("Gather Bot© By ScoreKeeper", 400, 335)
GUISetBkColor(6119597)
GUICtrlCreatePic("C:\Program Files\RoseBots\Images\Background.jpg", 0, 0, 400, 335, $WS_EX_TRANSPARENT)
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
$10 = GUICtrlCreateLabel("1. Login to ROSE and Alt-Tab back here.", 20, 70, 195, 15)
$1 = GUICtrlCreateLabel("This is a Gather Bot for Rose Online.", 40, 10, 180, 15)
$3 = GUICtrlCreateLabel("2. Select desired Gather Key and time delay.", 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("Gather 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)
$button = GUICtrlCreateCombo( "F1", 20, 120, 100)
GUICtrlSetData(-1, "F2")
GUICtrlSetData(-2, "F3")
GUICtrlSetData(-3, "F4")
GUICtrlSetData(-4, "F5")
GUICtrlSetData(-5, "F6")
GUICtrlSetData(-6, "F7")
GUICtrlSetData(-7, "F8")
;*********************************************|GUI|*********************************************

$sleep = GUICtrlCreateCombo( "1 second", 150, 120, 80)
GUICtrlSetData(-1, "2 seconds")
GUICtrlSetData(-2, "4 seconds")
GUICtrlSetData(-3, "6 seconds")
GUICtrlSetData(-4, "8 seconds")
GUICtrlSetData(-5, "10 seconds")
GUICtrlSetData(-6, "12 seconds")
GUICtrlSetData(-7, "14 seconds")


$Runbot = GUICtrlCreateButton("Run bot", 20, 180, 75)
GUICtrlSetOnEvent($Runbot, "Runbot")

GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Send("{ESC}")
        Case    GUICtrlRead ($button) = "F1"
            ConsoleWrite(GUICtrlRead($button) & @LF)
            Send("{F1}")
        Case    GUICtrlRead ($button) = "F2"
            ConsoleWrite(GUICtrlRead($button) & @LF)
            Send("{F2}")
        Case    GUICtrlRead ($button) = "F3"
            ConsoleWrite(GUICtrlRead($button) & @LF)
            Send("{F3}")
        Case    GUICtrlRead ($button) = "F4"
            ConsoleWrite(GUICtrlRead($button) & @LF)
            Send("{F4}")
        Case    GUICtrlRead ($button) = "F5"
            ConsoleWrite(GUICtrlRead($button) & @LF)
            Send("{F5}")
        Case    GUICtrlRead ($button) = "F6"
            ConsoleWrite(GUICtrlRead($button) & @LF)
            Send("{F6}")
        Case    GUICtrlRead ($button) = "F7"
            ConsoleWrite(GUICtrlRead($button) & @LF)
            Send("{F7}")
        Case    GUICtrlRead ($button) = "F8"
            ConsoleWrite(GUICtrlRead($button) & @LF)
            Send("{F8}")
    EndSelect
    _Sleep()
WEnd

Func _Sleep()
    Select
        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  ;==>_Sleep

Func Pause()
    $Paused = Not $Paused
    While $Paused
        Sleep(1)
        ToolTip(' Bot is "Paused"', 0, 0)
    WEnd
    ToolTip("")
EndFunc  ;==>Pause

Func Runbot()
    WinActivate("ROSE online")
    $Size = WinGetPos("ROSE online")
    $Width = $Size[2]
    $Height = $Size[3]
EndFunc  ;==>Runbot

Func CLOSEClicked()
    Exit
EndFunc  ;==>CLOSEClicked
Func EndScript()
    Exit
EndFunc  ;==>EndScript
Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Posted (edited)

Thats the problem.

Im a newb and do not know how to da that.

I have searched about but there is no info on this.

If anyone knows anything and could help please tell me.

Thanks a lot.

But the bot works fine with your script gafrost.

Thanks A LOT.

I'll try this for my other bots.

Edited by Scorekeeper
Fou-Lu - Bof4 "...Wouldst thou fight a god?"

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...