Citrix ICA Vuser Functions (CTRX) > Alphabetical List of Functions > ctrx_run_published_app

ctrx_run_published_app

Example General Functions

Invokes a published application.

int ctrx_run_published_app( char *app_name, char *app_args, [CONTINUE_ON_ERROR,] CTRX_LAST );

app_name The name of the published application.
app_args The arguments of the published application. A published application on the server can only access the argument if it is published with a percent sign and an asterisk (%*) as part of its command-line specification.
CONTINUE_ON_ERROR A constant, entered as shown without quotes. Overrides the error behavior run-time setting for this step so that script behaves as though the run-time setting was Continue on error.
CTRX_LAST A marker that indicates the end of the argument list.

ctrx_run_published_app invokes a published application, within a connected Citrix session. You can invoke use this function to invoke multiple applications during your session. This function is not generated during recording—you need to insert it manually.

Return Values

Citrix ICA Return Values

Parameterization

Parameterization is not available for this function.

Example

In the following example, ctrx_run_published_app invokes Notepad and ctrx_sync_on_window waits for the window come into focus.

Action() {
	ctrx_connect_server("server", "login", "pwd", "domain", CTRX_LAST);
	ctrx_wait_for_event("LOGON");
	if(ctrx_run_published_app("Notepad", CTRX_LAST) == E_OK) {
		 ctrx_sync_on_window( "Untitled - Notepad", ACTIVATE, 50, 50, 300, 300, "notepad_snapshot", CTRX_LAST);
	}
	ctrx_logoff(CTRX_NORMAL_LOGOFF, CTRX_LAST);
	ctrx_disconnect_server("server", CTRX_LAST);	
	return 0;
}