CitrixConnectIcaFile Function

Action

Establishes a connection to a Citrix MetaFrame server, or server farm, using an ICA file. Note that the Recorder (when an ICA file is used) scripts the absolute path to the ICA file. Therefore, to enable the script to run on remote agents, the ICA file must be manually added to the data files.

Include file

CitrixAPI.bdh

Syntax

CitrixConnectIcaFile( in sFile : string ) : boolean

Return value

  • true if successful

  • false otherwise

Parameter Description
sFile Path to an ICA file. If the ICA file has been added to the data files no directory is required.

Example:

dcltrans
  transaction TMain
  var
  begin
    CitrixInit(640, 480);
    CitrixConnectICAFile("C:\\Citrix\\launch.ica");
    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;