home *** CD-ROM | disk | FTP | other *** search
- /* This program, ssrecord.c, created by Hilgraeve and assigned to the Record */
- /* button, connects to a session (if not connected), then records logon. */
-
- /* $Revision: 1.1 $ */
- /* $Date: 1993/04/26 15:21:24 $ */
-
- /* Define main function, which is always the starting point of C programs. */
- /* (The term "void" indicates that the function returns no value.) */
- void main()
- {
- /* Declare variables */
- long ScriptHandle;
- int ReturnValue;
- char Buffer[256];
-
- /* Initialize variables */
- ReturnValue = 0;
- ScriptHandle = 0;
- memset(Buffer, 0, 256);
-
- /* Establish a link between this script program and HA/Win */
- ScriptHandle = haInitialize(0,0,0,0);
-
- /* Exit if intialization of link with HA/Win failed */
- if (ScriptHandle == 0) exit();
-
- /* Check to see is session is connected */
- ReturnValue = haGetConnectionStatus(ScriptHandle);
-
- /* If connected, same as selecting Automation from menu bar, the Record from Automation menu */
- if (ReturnValue != 2)
- ReturnValue = haMenuString(ScriptHandle, "AC");
- else
- /* If not connected, connect to session */
- ReturnValue = haConnectSession(ScriptHandle, 1);
-
- /* Terminate link between HA/Win and script program */
- haTerminate(ScriptHandle, 0);
- }
-
-
-