Send keyboard messages to another window to make it believe the string is actually being typed at the keyboard.


First available in version 3.0 build 2039.

Input Parameters:

hwnd - Handle of window where the string should be sent. If the hwnd is 0, the string will be sent to the window that has the input focus. If the hwnd is not 0, the specified window will become the foreground window before the string is sent.

text - A string to be sent. SWF Studio will figure out which virtual key codes are required to send the correct string.

Output Parameters:

No output parameters.

Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.Keyboard.sendString( paramsObject [, callbackParamsObject] [, errorParamsObject] );

Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.Keyboard.sendString( paramsObject );




The following example receives a window handle for an application to which we will send a string.

function sayHello(hwnd)
    ssCore.Keyboard.sendString({hwnd:hwnd, text:"Hello"});