Sign in to follow this  
Followers 0
AlvinHu1991

Send String Function

4 posts in this topic

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

Share this post


Link to post
Share on other sites



could you post an example of the expected output?

do you want the sentences to include next lines?

Share this post


Link to post
Share on other sites

("How are you?" , "How old are you?" , "Im doing great!")

When function script starts it will do:

Send("How old are you?") or ("How are you") or ("Im doing great!")

I will randomly select it from the list and use send() function to have it typed out

Share this post


Link to post
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.

Share this post


Link to post
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
Sign in to follow this  
Followers 0