Syntax: WSendString [["]/cClassName["]] [["]/nWindowName["]] [["]/sString["]] [/tTimeOut]
Places a string in the Windows system keyboard que. All parameters can be enclosed in double quotes, like in WSendString "/sHello World", to embed spaces. To pass a double quote itself, repeat it twice. If one or more of the optional /c or /n is specified, the window identified by window class and name will be brought to the front before sending the keys. Only top level windows will be searched and if no match is found the string will not be send.
/cClassName: Optional. Specifies the class name of the window to bring to the foreground before sending the keys. If you don't know the class name of a window you can leave it out.
/nWindowName: Optional. Specifies the window name (title) of the window to bring to the foreground before sending the keys.
/sString: Optional. String to send to system keyboard que. Inside the string ^, ! and & mean Control, Alt and Shift the next character. Double them to use the original characters like ^^ to send ^. ASCII control characters like ^m for enter and ^j for tab will work on Windows 95. By using the Alt (!)and Ctrl (^) characters in the string, you can let WSendString create more complex interactions.
/tTimeOut: Optional. Time in milliseconds to try and find the specified window. During the specified time WSendString will try to find the window once a second. Defaults to 10000.
Example: WSendString "/nDocument - WordPad" "/sWSendString typing in WordPad"'
will look for a top level window named "Document - WordPad" and if found bring it to the foreground and place the string "WSendString typing in WordPad" in the system keyboard que. If the window is not found a message box will inform you and the keys will not be send. If you specify no class name and no window name the keys will be sent right away, regardless of which window has the current keyboard focus.