home *** CD-ROM | disk | FTP | other *** search
- /* This program cis.c created by Hilgraeve and assigned to the compuserve session */
- /* runs an automated logon script for connecting to Compuserve. */
-
- /* $Revision: 1.1 $ */
- /* $Date: 1993/04/26 15:20:36 $ */
-
- /* 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[128];
-
- /* Initialize variables */
- ReturnValue = 0;
- ScriptHandle = 0;
-
- /* 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();
-
- /* Pause */
- haSleep(ScriptHandle, 1000L);
-
- /* Type a Ctrl-C */
- ReturnValue = haTypeText(ScriptHandle, 0, "\c");
-
- /* Wait for a prompt */
- if (ReturnValue >= 0)
- ReturnValue = haWaitForPrompt(ScriptHandle, 1, "ser ID: ", 300L, 32000L);
-
- /* Get User ID value from Runtime Values dialog box */
- if (ReturnValue >= 0)
- ReturnValue = haGetRuntimeValue(ScriptHandle, 2, 1, 128, Buffer);
-
- /* Type the value */
- if (ReturnValue >= 0)
- ReturnValue = haTypeText(ScriptHandle, 0, Buffer);
-
- /* Wait for a prompt */
- if (ReturnValue >= 0)
- ReturnValue = haWaitForPrompt(ScriptHandle, 1, "ssword: ", 300L, 32000L);
-
- /* Get Password value from Runtime Values dialog box */
- if (ReturnValue >= 0)
- ReturnValue = haGetRuntimeValue(ScriptHandle, 3, 1, 128, Buffer);
-
- /* Type the value */
- if (ReturnValue >= 0)
- ReturnValue = haTypeText(ScriptHandle, 0, Buffer);
-
- /* Terminate link between HA/Win and script program */
- haTerminate(ScriptHandle, 0);
- }
-
-
-