Jump to content

Help Auto Talk


Recommended Posts

its the code..

Opt("SendKeyDelay", "100")
Opt("SendKeyDownDelay", "100")

HotKeySet("{F5}", "startbot")
HotKeySet("{F7}", "HK_STOP")


GUICreate("Auto Talking" ,300, 150, 100, 100)

$String = GuiCtrlCreateInput("Write here" ,10, 20, 250, 20)

GUICtrlCreateLabel("Auto Talk for Mu Online", 10, 130, 150, 20)

GUISetState ()

Func startbot()
    
    While (1)
    Send("{ENTER}")
    Send(GUICtrlRead($String))
    Send("{ENTER}")
    Sleep(5000)
    WEnd
EndFunc

Func HK_STOP()
while (1)
  Sleep(1000)
WEnd
EndFunc


while(1)
Sleep(1500)
WEnd

but why when im put "sum +1+2" i get "sum !@" ???

thanks =]

Link to comment
Share on other sites

Opt("SendKeyDelay", "100")
Opt("SendKeyDownDelay", "100")

Dim $old_read, $GO

HotKeySet("{F5}", "startbot") ; start and pause bot
HotKeySet("{F7}", "HK_STOP")


GUICreate("Auto Talking", 300, 150, 100, 100)
$String = GUICtrlCreateInput("Write here", 10, 20, 250, 20)
GUICtrlCreateLabel("Auto Talk for Mu Online", 10, 130, 150, 20)
GUISetState()


While (1)
    Sleep(500)
    If $GO Then
        $read = GUICtrlRead($String)
        If $read <> $old_read Then
            Send("{ENTER}")
            Send($read, 1)
            Send("{ENTER}")
            $old_read = $read
        EndIf
    EndIf
WEnd

Func startbot()
    $GO = Not $GO
EndFunc   ;==>startbot

Func HK_STOP()
    Exit
EndFunc   ;==>HK_STOP

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

its the code..

Opt("SendKeyDelay", "100")
Opt("SendKeyDownDelay", "100")

HotKeySet("{F5}", "startbot")
HotKeySet("{F7}", "HK_STOP")


GUICreate("Auto Talking" ,300, 150, 100, 100)

$String = GuiCtrlCreateInput("Write here" ,10, 20, 250, 20)

GUICtrlCreateLabel("Auto Talk for Mu Online", 10, 130, 150, 20)

GUISetState ()

Func startbot()
    
    While (1)
    Send("{ENTER}")
    Send(GUICtrlRead($String))
    Send("{ENTER}")
    Sleep(5000)
    WEnd
EndFunc

Func HK_STOP()
while (1)
  Sleep(1000)
WEnd
EndFunc


while(1)
Sleep(1500)
WEnd

but why when im put "sum +1+2" i get "sum !@" ???

thanks =]

You need to do this

GUICreate("Auto Talking" ,300, 150, 100, 100)

$String = GuiCtrlCreateInput("Write here" ,10, 20, 250, 20)
$string = StringReplace($string("+","{+}");<----------------otherwise the + is interpreted as shift.
GUICtrlCreateLabel("Auto Talk for Mu Online", 10, 130, 150, 20)

GUISetState ()

Func startbot()
    
    While (1);<---these while1/wend functions will cause problems because you have no way of getting out of them
    Send("{ENTER}")
    Send(GUICtrlRead($String))
    Send("{ENTER}")
    Sleep(5000)
    WEnd
EndFunc
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

You need to do this

GUICreate("Auto Talking" ,300, 150, 100, 100)
 
 $String = GuiCtrlCreateInput("Write here" ,10, 20, 250, 20)
 $string = StringReplace($string("+","{+}");<----------------otherwise the + is interpreted as shift.
 GUICtrlCreateLabel("Auto Talk for Mu Online", 10, 130, 150, 20)
 
 GUISetState ()
 
 Func startbot()
     
     While (1);<---these while1/wend functions will cause problems because you have no way of getting out of them
     Send("{ENTER}")
     Send(GUICtrlRead($String))
     Send("{ENTER}")
     Sleep(5000)
     WEnd
 EndFunc

WOW!!!...???

@Martin, you need to take another look, you are way-off this time, way-off!

...... And we know you are sharper than that!

1 $string = StringReplace($string("+","{+}");<----------------otherwise the + is interpreted as shift.

No Way! He just created a control with that name ... AND what happens to the continued inputs??

Just place a comma and a 1

Send(GUICtrlRead($String) , 1)

That will fix it

2 While (1);<---these while1/wend functions will cause problems because you have no way of getting out of them

NOT TRUE!

here is his code, with ONE Change, I placed an Exit inside the original Func HK_STOP()

Opt("SendKeyDelay", "100")
Opt("SendKeyDownDelay", "100")

HotKeySet("{F5}", "startbot")
HotKeySet("{F7}", "HK_STOP")


GUICreate("Auto Talking" ,300, 150, 100, 100)

$String = GuiCtrlCreateInput("Write here" ,10, 20, 250, 20)

GUICtrlCreateLabel("Auto Talk for Mu Online", 10, 130, 150, 20)

GUISetState ()

Func startbot()
   
    While (1)
    Send("{ENTER}")
    Send(GUICtrlRead($String))
    Send("{ENTER}")
    Sleep(5000)
    WEnd
EndFunc

Func HK_STOP()
    Exit
while (1)
  Sleep(1000)
WEnd
EndFunc


while(1)
Sleep(1500)
WEnd

8)

NEWHeader1.png

Link to comment
Share on other sites

Thanks =] its slove.. and its the project:

and i dont want that F7 will exit the bot, just pause him xD

Opt("SendKeyDelay", "100")
Opt("SendKeyDownDelay", "100")

HotKeySet("{F5}", "startbot")
HotKeySet("{F7}", "HK_STOP")


GUICreate("Auto Talking" ,300, 150, 100, 100)

$String = GuiCtrlCreateInput("Write here" ,10, 20, 250, 20)
GUICtrlCreateLabel("Auto Talk for Mu Online", 10, 130, 150, 20)

GUISetState ()

Func startbot()
     While (1)
     Send("{ENTER}")
     Send(GUICtrlRead($String) , 1)
     Send("{ENTER}")
     Sleep(5000)
     WEnd
EndFunc

Func HK_STOP()
while (1)
  Sleep(1000)
WEnd
EndFunc


while(1)
Sleep(1500)
WEnd
Link to comment
Share on other sites

Opt("SendKeyDelay", "100")
Opt("SendKeyDownDelay", "100")

HotKeySet("{F5}", "startbot")
HotKeySet("{F7}", "HK_STOP")


GUICreate("Auto Talking" ,300, 150, 100, 100)

$String = GuiCtrlCreateInput("Write here" ,10, 20, 250, 20)
GUICtrlCreateLabel("Auto Talk for Mu Online", 10, 130, 150, 20)

GUISetState ()

Func startbot()
     While (1)
     Send(@CRLF & GUICtrlRead($String) & @CRLF , 1)
     Sleep(5000)
     WEnd
EndFunc

Func HK_STOP()
while (1)
  Sleep(1000)
WEnd
EndFunc


while(1)
Sleep(1500)
WEnd

@CRLF acts as a line break. :D

Link to comment
Share on other sites

WOW!!!...???

@Martin, you need to take another look, you are way-off this time, way-off!

...... And we know you are sharper than that!

1 $string = StringReplace($string("+","{+}");<----------------otherwise the + is interpreted as shift.

No Way! He just created a control with that name ... AND what happens to the continued inputs??

Just place a comma and a 1

Send(GUICtrlRead($String) , 1)

That will fix it

2 While (1);<---these while1/wend functions will cause problems because you have no way of getting out of them

NOT TRUE!

here is his code, with ONE Change, I placed an Exit inside the original Func HK_STOP()

Opt("SendKeyDelay", "100")
Opt("SendKeyDownDelay", "100")

HotKeySet("{F5}", "startbot")
HotKeySet("{F7}", "HK_STOP")


GUICreate("Auto Talking" ,300, 150, 100, 100)

$String = GuiCtrlCreateInput("Write here" ,10, 20, 250, 20)

GUICtrlCreateLabel("Auto Talk for Mu Online", 10, 130, 150, 20)

GUISetState ()

Func startbot()
   
    While (1)
    Send("{ENTER}")
    Send(GUICtrlRead($String))
    Send("{ENTER}")
    Sleep(5000)
    WEnd
EndFunc

Func HK_STOP()
    Exit
while (1)
  Sleep(1000)
WEnd
EndFunc


while(1)
Sleep(1500)
WEnd

8)

Oh dear.

Thanks Valuater.

What I meant was that instead of

Send(GUICtrlRead($String))

you should have

Send(StringReplace(GUICtrlRead($String),"+",{+}));otherwise + is interpreted as shift

but Send(GuiCtrlRead($String),1) is obviously the right way.

My apologies Gillboss .

JamesB is right, I need to slow down and drive on the correct side of the road. (Refers to a post in chat.)

Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...