Jump to content

Send String Function


Recommended Posts

I need to use send() to string a list of sentences

something like this: ("How are you?" , "How old are you?" , "Im doing great!")

I have seen a few of string/array examples, but they were all msgbox and i dont really know how to convert it into send() instead of msgbox()

if anyone can show me an example or a link if they found one...

here's an example of my script:

HotKeySet("{Home}","Start")
HotKeySet("{end}","stop")
HotKeySet("{pause}","Pause")
Func start()
// string list?
send() // string list)
EndFunc
While 1
    Sleep(25)
WEnd
Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep("360000")
    WEnd
EndFunc
Func Stop()
    Sleep(25)
Exit
EndFunc

thank you for the help

Link to comment
Share on other sites

Untested

HotKeySet("{Home}", "Start")
HotKeySet("{end}", "Stop")
HotKeySet("{pause}", "Pause")

While True
    Sleep(100)
WEnd

Func start()
    Local Const $strings[3] = ["How are you?", "How old are you?", "I'm doing great!"]
    Local $string = $strings[Random(0, 2, 1)]
    Send($string)
EndFunc   ;==>start

Func Stop()
    Sleep(25)
    Exit
EndFunc   ;==>Stop

Func TogglePause()
    $Paused = Not $Paused
    While $Paused
        Sleep(100)
    WEnd
EndFunc   ;==>TogglePause

Not liable for any damages if your head asplodes.

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...