AlvinHu1991 Posted January 11, 2012 Posted January 11, 2012 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
DanielF847 Posted January 11, 2012 Posted January 11, 2012 could you post an example of the expected output? do you want the sentences to include next lines?
AlvinHu1991 Posted January 11, 2012 Author Posted January 11, 2012 ("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
jaberwacky Posted January 12, 2012 Posted January 12, 2012 UntestedHotKeySet("{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. Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum?
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