CitrixSetOption Function

Action

Sets a particular option.

Include file

CitrixAPI.bdh

Syntax

CitrixSetOption( in nOption : number,
                 in nValue  : number ) : boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
nOption

Specify one of the following values:

  • CITRIX_OPT_UseHttp:

    Set to 1 to use TCP/IP + HTTP as network protocols.

    Set to 0 to use only TCP/IP.

  • CITRIX_OPT_SpeedScreenLatRed:

    Speed Screen Latency Reduction.

    0 .. Off.

    1 .. On

  • CITRIX_OPT_EncryptLevel:

    Use one of the following values:

    0 .. Server Default.

    1 .. Basic encryption.

    2 .. RC5 128 bit encryption for login only.

    3 .. RC5 40 bit encryption.

    4 .. RC5 56 bit encryption.

    5 .. RC5 128 bit encryption

  • CITRIX_OPT_Compress:

    Select this option to compress all transferred data. Reduces the size of data, but requires additional processor resources.

    0 .. Off.

    1 .. On

  • CITRIX_OPT_ImgCache:

    Select this option to store commonly -used graphical objects, such as bitmaps, in a local disk cache.

    0 .. Off.

    1 .. On

  • CITRIX_OPT_QueueMouse:

    Select this option to queue mouse updates. Reduces the number of network packets sent from the Citrix client to the Citrix server. Specify the time to queue input in milliseconds.

  • CITRIX_OPT_QueueKeyboard:

    Select this option to queue keyboard updates. Reduces the number of network packets sent from the Citrix client to the Citrix server. Specify the time to queue input in milliseconds.

  • CITRIX_OPT_DisconnectOnTransEnd:

    Select this option to disconnect the Citrix client at the end of each transaction (this includes the TInit transaction).

    0 .. Off.

    1 .. On

  • CITRIX_OPT_SyncTimeout:

    Specify the default synchronization timeout (in milliseconds) to be used by all CitrixWaitForXXX functions, that do not specify a timeout value.

  • CITRIX_OPT_PostActionThinkTime:

    Specify the time (in milliseconds) that the virtual user is to remain inactive between actions.

  • CITRIX_OPT_PostSyncThinkTime:

    Specify the time (in milliseconds) that the virtual user is to remain inactive after passing a successful synchronization point (CitrixWaitForXXX).

  • CITRIX_OPT_LogBmpOnUserAction:

    When TrueLog is enabled a screenshot is made and written to the TrueLog at the end of each synchronization function. Select this option to additionally capture and write a screenshot at the beginning of each user -action.

    0 .. Off.

    1 .. On

  • CITRIX_OPT_DumpRgnOnSyncFailure:

    The CitrixWaitForScreen function captures a screen region and checks it against a specified condition (normally it is compared against a hash value that’s captured at recording). If the function call fails (the condition does not match and the timeout period expires) when this option is selected, the caught screen region is dumped to a file in the result directory. The file can then be examined or compared to what was written during recording for root cause analysis.

    0 .. Off.

    1 .. On

  • CITRIX_OPT_ForcePos:

    Select this option to have calls to CitrixWaitForWindowCreation and CitrixWaitForWindowRestore move the window to the coordinates that were captured during recording. When this box is not checked, both functions provide a parameter (bForcePos) that enables this option for each individual call.

    0 .. Off.

    1 .. On

  • CITRIX_OPT_MouseTimeDown:

    Specify the length of time that the virtual user is to hold the mouse button in the pressed state. Used for CitrixMouseClick and CitrixMouseDblClick.

  • CITRIX_OPT_MouseDblClickDelay:

    Specify the length of time that is to pass between the two clicks of a double click. Used for CitrixMouseDblClick.

  • CITRIX_OPT_MouseSpeed:

    Specify the speed at which the mouse is to move across the screen (pixels per second).

  • CITRIX_OPT_KeyTimeDown:

    Specify the length of time that the virtual user is to hold a keyboard key in the down state. Used for CitrixKey and CitrixKeyString.

  • CITRIX_OPT_KeyTimeIdle:

    Specify the length of time that is to pass between the individual key-strokes specified by the CitrixKeyString function.

  • CITRIX_OPT_KeyTimeRepeat:

    Specify the time required for a complete key stroke when simulating repeat functionality (a value of 50 means 20 keys per second).

  • CITRIX_OPT_ScreenTextPolling

    Specify the polling period in milliseconds that the Citrix Replay engine will wait to poll a screen for an update (0 means no polling). If omitted, the parameter is set to 1000.

nValue Value of the selected option.

Example:

  transaction TMain
  var
  begin
    CitrixInit(640, 480);
    CitrixSetOption(CITRIX_OPT_SyncTimeout, 60000); // sync timeout = 60 sec.
    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;