Example Connection Functions

Sets a connection option to a Citrix ICA server and then connects to server.

int ctrx_set_connect_opt( eConnectionOption option, char *value);

option eConnectionOption
value The option's value

ctrx_set_connect_opt sets a connection option prior to establishing a connection from a Citrix client to a Citrix server, and then executes the connection to the server.

Pass one of the following as the option argument:

Return Values

Citrix ICA Return Values


The parameter value can be parameterized.


In the following example, the function ctrx_set_connect_opt is invoked to start the Microsoft Windows Calculator application immediately after login to the server ludens. A further call to ctrx_set_connect_opt with the ICAFILE option directs VuGen to the script to the ICA initialization file.

Action() {

     ctrx_set_connect_opt(APPLICATION, "#calc");
     ctrx_set_connect_opt(ICAFILE, "c:\\temp\\word.ica");
     ctrx_connect_server("ludens", "test10", "test", "ludens", CTRX_LAST);

     ctrx_set_window("Calculator", CTRX_LAST);

     ctrx_mouse_click(247, 9, LEFT_BUTTON, 0, "Calculator", CTRX_LAST);
     ctrx_unset_window("Calculator", CTRX_LAST);

     ctrx_disconnect_server("ludens", CTRX_LAST);

     return 0;