CitrixSetApplication Function

Action

When a connection to a published application is to be established, SetApplication must be called before CitrixConnect.

Include file

CitrixAPI.bdh

Syntax

CitrixSetApplication( in sApplication : string ) : boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
sApplication Name of the published application.

Example:

  transaction TMain
  var
  begin
    CitrixInit(640, 480);
    CitrixSetApplication("Excel");
    CitrixConnect("myserver", "myusername", "mypass", "mydomain", COLOR_16bit);
    CitrixWaitForLogon();
    hWnd4 := CitrixWaitForWindowCreation("Microsoft Excel – Book*", MATCH_Wildcard, 0x15CF0000, -4, -4, 648, 488);
    CitrixMouseClick(636, 14, hWnd4, MOUSE_ButtonLeft);
    CitrixWaitForWindow(hWnd4, EVENT_Destroy);
    ThinkTime(2.63);
    CitrixDisconnect();
  end TMain;