home *** CD-ROM | disk | FTP | other *** search
- /* This program, sview.c, created by Hilgraeve and assigned to the View */
- /* button, cycles the Phonebook between various views, as if you selected */
- /* View|[Icon][Details][Statistics]. */
-
- /* $Revision: 1.1 $ */
- /* $Date: 1993/04/26 15:20:58 $ */
-
- /* Define main function, which is always the starting point of C programs. */
- /* (The term "void" indicates that the function returns no value.) */
- void main ()
- {
- /* Declares a variable and initializes it to zero. */
- long ScriptHandle = 0;
- int DisplayMode;
-
- /* 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 current phonebook display */
- DisplayMode = haGetDisplay(ScriptHandle);
-
- /* Cycle through display modes */
- switch (DisplayMode)
- {
- case 1:
- DisplayMode = 2;
- break;
- case 2:
- DisplayMode = 3;
- break;
- default:
- DisplayMode = 1;
- break;
- }
-
- /* Change phonebook display */
- haSetDisplay(ScriptHandle, DisplayMode);
-
- /* Terminate link between HA/Win and script program */
- haTerminate(ScriptHandle, 0);
- }
-