CitrixWaitForLogon Function

Action

This function waits until a Citrix client logs on successfully or a specified timeout period expires.

Include file

CitrixAPI.bdh

Syntax

CitrixWaitForLogon( in nTimeout  : number optional ) : boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
nTimeout Specifies the time in milliseconds to wait for the Citrix client to log on (optional). When this parameter is omitted or set to 0, the default timeout is used. The default value can be adjusted by profile settings ( Settings > Active Profile > Citrix > General > Synchronization timeout ) or an appropriate call to the CitrixSetOption function.

Example:

dcltrans
  transaction TMain
  var
  begin
    CitrixInit(640, 480);
    CitrixConnect("server1", "username", "password", "companydomain", COLOR_16bit);
    CitrixWaitForLogon();
    hWnd4 := CitrixWaitForWindowCreation("", MATCH_Exact, 0x96840000, -2, 452, 644, 30);
    hWnd5 := CitrixWaitForWindowCreation("ICA Seamless Host Agent", MATCH_Exact, 0x94C800C4, 0, 0, 390, 223);
    CitrixWaitForWindow(hWnd5, EVENT_Activate);
    CitrixWaitForWindowCreation("Program Manager");
    ThinkTime(31.50);
    CitrixMouseClick(217, 192, hWnd5, MOUSE_ButtonLeft);
    CitrixWaitForWindow(hWnd5, EVENT_Destroy);
    CitrixDisconnect();
  end TMain;