Scripting Guide

NAURTECH WEB BROWSER AND TERMINAL EMULATION FOR WINDOWS CE AND WINDOWS MOBILE
CETerm Scripting Guide Page 85
b.AddMetaItem( "Signal", "y=100" );
// Update information items for location to take effect
CETerm.PostIDA( "IDA_INFO_REFRESH", session );
}
}
4.3 THE ONIBMCOMMAND EVENT
The OnIBMCommand event is fired when a special extended command format is
received in an IBM emulation session screen. Extended commands are
documented elsewhere, but basically this event requires the two characters “#X”
starting in the second column of the first row. The CETerm configuration option
“Extended Commands” must be enabled for this event to fire. The handler script
may perform any desired actions. Typically, the screen text contains additional
information used by the handler.
Syntax
function OnIBMCommand ( session, command )
session index of session receiving the command
command specified command (e.g., “#X” )
Example
This example looks at the data following the command and activates an FTP file
transfer.
/* OnIBMCommand */
function OnIBMCommand ( session, command )
{
// Get full line from screen
// Expect: #X|FTP|myserver|localfilename|remotefilename
var line1 = CETerm.Session( session ).Screen.GetTextLine( 1 );
var args = line1.split( "|" );
// Activate FTP
if ("FTP" === args[1])
{
var ftp = OS.Network.FTP;
if (0 === ftp.Login( args[2], "ftpuser", "secret" ))
{
ftp.PutFile( args[3], args[4] );
ftp.Logout();
}
}