EMConnect

Opens a conversation with the BlueZone Display session.  The EMConnect command must be called before any other BlueZone Script Host methods that access data in the host screen.

EMConnect will auto-connect to the BlueZone session that launched Script Host or it will search for the first available session if launched from BlueZone desktop when no short name session identifier is specified.

Parameters:

SessionShortName  -  Uniquely identifies the BlueZone Display session.  The Session Name corresponds to the HLLAPI Short Name Session Identifier configured in the Options::API settings in BlueZone Display.

Returns:

0 for success; or a non-zero error code.  See Error Codes for a complete listing of error code descriptions.

Remarks:

The script may only be connected to one display session at a time.  When connecting to multiple sessions, any previously connected session is automatically disconnected.

Example:

UserId = "John"

Password = "Smith"

 

ResultCode = EMConnect( "A" )

 

If ( ResultCode = 0 ) Then

   EMWriteScreen Userid, 5, 63

   EMWriteScreen Password, 6, 63

   SendKey "@E"

   EMWaitReady 10, 1

End If