VERSION 1.1.0 - QUICK REFERENCE
Introduction 
Events Triggering Scripts Reference 
Built-In Commands Reference
CyberSecretary
Script Language Reference
 
Creating Scripts 
Sending Items To CyberSecretary 
Manually Creating Scripts 
Editing Scripts 
Renaming Scripts 
Deleting Scripts 
 
Appearance 
Message  
Caption  
Gender  
Picture  
Icon  
Sound  
XPos  
YPos  
Displaying As Icon
Buttons And Commands  
BkgCommand  
OKButton  
CancelButton  
YesButton  
NoButton  
Snooze  
Default 
List 
InputLines
Script Control  
Wait  
Earliest  
Latest  
NextSection  

Branching   

Looping

 
CyberSecretary's behavior is controlled by scripts.  Scripts are simply text files having the extension .cyb. These files are structured like Windows .INI files, with a section name enclosed in brackets, and several pairs of keywords (script directives) and values.  The first section of any script must be called [Init].  There are script directives provided for the following general purposes: For example, the following script will create the dialog shown to the left:

[Init]
Message=Please pick a search engine and let me know what you want me to look for, <YourName>.
Icon=Earth
InputLines=1
List=AltaVista|InfoSeek|Lycos|Excite|Yahoo
OKButton=SearchInternet
CancelButton=Null

You can double click on any script file and the contents of the script will be executed by your CyberSecretary.  Usually, however, scripts will be placed in special folders, and will have special names:

Creating and Modifying Scripts
 
It is very easy to create and modify scripts.  Your CyberSecretary comes with more than a dozen predefined scripts for performing such tasks as opening Outlook folders, announcing new mail, printing and filing sent mail messages, creating phone log entries or taking phone messages, recording business expenses and preparing expense reports, mailing your schedule to your human assistant, getting stock prices, performing Internet searches, even announcing the time of day.

New scripts can be easily created simply by right-clicking on any program, document, folder or shortcut and sending it to your CyberSecretary.  You can also manually create scripts by right-clicking in any Explorer folder and selecting New | CyberSecretary Script.

Scripts can be edited in any text editor, or you can right-click on your CyberSecretary's dialog while a script is running to edit that script..

Sending Items To CyberSecretary
 
The easiest way to create a new script which will launch a program, open a document or folder, or access an Internet site is to right-click on any program, folder, document, or shortcut and send it to your CyberSecretary's desk tray, as shown in this illustration.

NOTE:  If you have Windows 98 installed, or if you have installed the Internet Explorer 4 Active Desktop, you can not only right-click on files in Explorer windows, you can also right-click on items on the "Favorites" menu, Start Menu, Internet History list, and recent document list, and send these to your CyberSecretary.  (See the illustration.)

Your CyberSecretary will instantly appear, so you can "teach" her the new task.  You will be asked to specify when you would like the task to be performed (either on a scheduled basis, or as a choice when you right-click on your CyberSecretary's tray icon); whether you would like the task performed automatically or whether you'd like to be asked first; what message and icon you would like displayed; and where you would like your CyberSecretary to appear on-screen.

You will also be given a chance to "fine tune" details of the script, in which case the newly-created script will be opened in your favorite text editor.  For example, you may want to modify a script for accessing an Internet site, so that instead of opening the Internet site in your web browser, she will fetch the contents of the Internet page and post it to your Inbox.  This could be done by changing the following line:

to the following: Manually Creating Scripts
 
You can also manually create scripts using any text editor.  The easiest way to do this is to right-click on any blank area in any Explorer window, and choose New | CyberSecretary Script. This will create a simple blank script with most of the common script directives and blank values.  You can then give the script an appropriate name (following the required naming conventions, when creating scheduled scripts, random scripts, or scripts triggered by Outlook events).  Right-click on the script and choose Edit to open the script in your favorite text editor.

Editing Scripts
 
The easiest way to edit a script is to right-click on the CyberSecretary dialog box (or press the Windows Menu key) while a script is running.  You will be presented with a menu of choices, including editing the script.  This will cause the execution of the script to end, and the script will be opened for editing in your favorite text editor.  This is a convenient way to fine-tune a script, if you discover, when the script runs, that it does not quite do what you intended, or that you'd like to add some new function or option.

As noted above, you can also edit any script by right-clicking it in any Explorer window and choosing Edit.

Renaming Scripts
 
One of the choices when right-clicking on a running script is to rename the script.  Some scripts (e.g. scheduled scripts) follow a naming convention which controls their function; renaming the script will alter that function.  For example:

Terminating and Deleting Scripts
 
Another choice given if you right-click on a running script is to terminate execution of the script (just this once), or permanently deleting the script.

Pressing the {Esc} key while a script is running will also terminate the script.

Note: Since most scripts are automatically triggered based on their name, you can suspend the future execution of a script without permanently deleting the script simply by renaming it; e.g. rename Dly1010.cyb as xDly1010.cyb.

Script Directives

The CyberSecretary script language is based on Directives for specifying appearance and behavior of the script.  Each section of a script includes one or more directives, each followed by a value.  The rest of this document will describe each of the recognized script directives, and indicate how it can be used in scripts.

Controlling Appearance
 
The most basic script directives control the appearance (Caption=, Message=, Icon= and Picture=), Sound=, and screen position (XPos=, YPos=) of the CyberSecretary dialog.

Message=Message

The Message directive is used to specify the message which is to appear inside your CyberSecretary's "speech balloon." Normally there is space for about six lines of text. However, please note that if more text is specified than will fit, the balloon automatically expands to cover it.

You may display longer messages (more than about 200 characters; up to what will fit on the screen) simply by specifying the name of a text file as this parameter. This will cause the program to read the contents of the text file and display it as a message.

In either case, the specified message may include the following variables, which must be enclosed in angle brackets, and which are case sensitive. These angle brackets will automatically be replaced with the specified information, as follows:

Caption=Caption
 
This directive controls the caption that is displayed in the CyberSecretary dialog.  The caption will be preceded by your CyberSecretary's name.  If this directive is omitted, the name of the script is displayed as the caption.

Gender=Male|Female
 
This directive controls the gender of the CyberSecretary.  If this directive is omitted, the default gender (chosen at the time CyberSecretary was first installed) will be read from the Registry.

Picture=Smile|Laugh|Sad|Angry|Talk|Straight
 
This directive controls the facial expression of the CyberSecretary.  If this directive is omitted, Smile will be used as the default.

Icon=Icon
 
Controls the icon that is displayed in the CyberSecretary dialog.  The name of the icon refers to an entry in the CyberSecretary icon index, ICONS.INI in the CyberSecretary program folder. You may select any icon name appearing in the [Icons] section. This file may be customized to add new icons. Simply include an entry in the [Icons] section as follows:

The name to the left of the equal sign is the name for the icon, which can be specified in any script. To the right of the equal sign goes the name of the icon library (.EXE or .DLL file containing the icon) and the ordinal number of the icon in the library.  In the above example, a script reference to Icon=Widget will cause the 32nd icon in the OUTLLIB library to be displayed.

The library must also be specified in the Library] section of ICONS.INI, showing the full path to the library; e.g.:

You will see that ICONS.INI already contains entries for the icon libraries containing the most useful office icons: SHELL32 (the Windows 95 library), PIFMGR (the Win95 DOS icon library), OUTLLIB (the Outlook icon library), as well as its own CyberSecretary icon library, CSICONS.

Sound=Sound
 
Causes a .WAV file to be played when the script section is executed. The .wav extension may be omitted. If the path is omitted, CyberSecretary will look in the \Sounds subfolder of its program folder. CyberSecretary comes with a library of useful voice clips and sound effects.

Note: You do not need to specify a sound. If you do not specify a sound, CyberSecretary automatically uses a set of predefined sound effects, with the following names: SHOW, HIDE, CLICK, INPUT and ERROR.

XPos=0 to 100
 
Controls the horizontal position of the CyberSecretary dialog on the screen.  The range is from 0 to 100, with 0 being the left edge of the screen, 100 being the right edge of the screen, and 50 being centered.  By default, the dialog is centered.  However, if you specify a location in any section of the script, the dialog will remain at that position through subsequent script sections until you move it.

YPos=0 to 100
 
Controls the vertical position of the CyberSecretary dialog on the screen.  The range is from 0 to 100, with 0 being the top edge of the screen, 100 being the bottom edge of the screen, and 50 being centered.  By default, the dialog is centered.  However, if you specify a location in any section of the script, the dialog will remain at that position through subsequent script sections until you move it.

Displaying As An Icon
 
You can write a script which will display your CyberSecretary on screen as an icon or avatar; i.e., without the full dialog box.  This is useful if you want your CyberSecretary to discreetly appear on screen with information, and to respond further only if requested.

Your CyberSecretary will automatically appear as an icon (avatar) if the following conditions exist:

You may specify the Wait directive and a Sound, and also XPos and YPos.  Your CyberSecretary will appear at the indicated location, play the sound, wait for the specified time, and then leave.  If, during this time, the user presses Enter, the script will move to the section specified by the NextSection directive.  The user may also cause the CyberSecretary to disappear before the time is up by pressing {Esc}.

Buttons And Commands
 
Unless all you want to do is write scripts to display messages (see, for example, the predefined script Tell Me The Time.cyb), the "real" work of CyberSecretary is done through commands, which are usually triggered when the user selects a particular button.  There are a number of script directives for specifying which buttons are to appear, and which commands are to be executed when that particular button is pressed.

Note that commands can include the following:

You can string together two or more commands on the same line, by separating them with a vertical bar: The rest of this section will describe how to make your scripts display buttons for user selection, and how to specify commands to be executed when buttons are pressed.

BkgCommand=Commands
 
Any command specified by the BkgCommand= directive will be executed while the CyberSecretary dialog is displayed, and before any button is pressed.  The following script, for example, will launch Calculator with a confirming message:

OKButton=Commands
 
Any command specified by the OKButton= directive will cause an OK button to appear in your CyberSecretary's dialog.  The specified command will be run if this button is pressed.  Note that the OK button can appear by itself, or with the Cancel button or the Snooze button.

CancelButton=Commands
 
Any command specified by the CancelButton= directive will cause a Cancel button to appear in your CyberSecretary's dialog.  The specified command will be run if this button is pressed.  Note that the Cancel button can appear only with the OK button.

Normally, the Cancel button will be followed by the null command, and pressing the Cancel button will cause the script to terminate.  (A user can also terminate a script by pressing the {Esc} key.)

YesButton=Commands
 
Any command specified by the YesButton= directive will cause a Yes button to appear in your CyberSecretary's dialog.  The specified command will be run if this button is pressed.  Note that the Yes button can appear by itself, or with the No button or the Snooze button.

NoButton=Commands
 
Any command specified by the NoButton= directive will cause a No button to appear in your CyberSecretary's dialog.  The specified command will be run if this button is pressed.  Note that the No button can only appear with the Yes button.

Snooze=Minutes
 
If the Snooze= directive is present, a Snooze button will be displayed.  Pressing this button will cause the script to be "snoozed" for the specified number of minutes.  The script will resume execution after the specified number of minutes.  Note: the user can press the Snooze button repeatedly.  Also, even if no Snooze button appears, the user can right-click on the CyberSecretary dialog (or press the Windows Menu button) and snooze the script for a user-selected amount of time.  The Snooze button can only be displayed with either the OK button or the Yes button.

Default=Yes|No|OK|Cancel|Snooze
 
This directive specifies which button is to be the default; that is, which button is pressed if the user presses {Enter} (or, if no text box or list box is shown, the spacebar).  If this directive is not specified, by default the OK button or the Yes button (whichever is shown) is the default.

As with any good Windows application, you can use the keyboard to select buttons by pressing Alt followed by the underlined letter (mnemonic) on the button.  For example, press Alt-O to choose the OK button, Alt-Y to choose the Yes button, Alt-N to choose the No button, or Alt-Z to choose the Snooze button.  Press {Esc} to choose the Cancel button.

CyberSecretary goes one step further toward simplicity.  As long as no text box or list box is displayed, you can simply press the appropriate letter for the button: O, Y, N, Z or {Esc}.

List=List
 
This directive causes a drop-down list box to appear, displaying the items shown in the list.  This directive has two uses:

InputLines=Lines
 
This command causes a free-form text input box to appear.  The size of the free-form text input box is specified by the Lines parameter, and can range from a single line, to as many lines as will fit on your screen.  This is useful for entering text required by other CyberSecretary commands.  For example, the following script would create a Journal entry from the most recently sent mail message: Script Control
 
These script directives provide further control over the execution of scripts, including specifying how long the CyberSecretary dialog will be displayed, times where the script section can run, and the next section to execute in sequence.

Wait=Seconds
 
This directive controls how long the CyberSecretary dialog is displayed.  It is only effective if no button, list or text box is displayed, i.e. the CyberSecretary is merely displaying a message.  The default is 3 seconds.  Use this command to specify a longer or shorter display time.

Earliest=Time
 
This directive limits the time of day that a particular script section will be run.  The time must be specified in 24-hour format, including a colon.  If the script is executed before the time specified by the Earliest= directive, the script section will be skipped.  For example, the following script will display a message only if the script is run after 6:00 p.m.:

This directive is most useful in random scripts (to limit the time range during which they will be run), but can also be used in any other scheduled script (e.g. the StartUp script or the ShutDown script).

Latest=Time
 
This directive limits the time of day that a particular script section will be run.  The time must be specified in 24-hour format, including a colon.  If the script is executed after the time specified by the Latest= directive, the script section will be skipped.  For example, the following script will display a message only if the script is run before 10:00 a.m.:

This directive is most useful in random scripts (to limit the time range during which they will be run), but can also be used in any other scheduled script (e.g. the StartUp script or the ShutDown script).

NextSection=Section
 
This directive specifies the next section which will be executed, unless the user presses a button that points to a different script section.  If no next section is specified, the script will terminate.  The following script section will branch to different sections depending on the button pressed by the user.

Note: you may, but need not, enclosed the script name in [brackets] when using the NextSection= directive.

Branching
 
As the preceding example shows, it is possible to have a script perform different actions depending on input from the user.  In the above example, if the user presses Yes, the script will branch to the [Print] section.  If the user presses No, the script will branch to the [Finished] Section.

You can have a script offer more than two choices using the List= directive.  The following script, for example, presents the user with five choices, each pointing to a different script section for carrying out the task:

You can have different script sections point to the same section.  A common use will be to point to a [Finished] section to gracefully exit a script when all tasks are complete: There is a built-in command, BranchToItemType, which performs more sophisticated branching depending on the type of Outlook item currently open.  This command allows different script sections to execute for handling mail messages, contact items, etc.  Follow the hyperlinks for more information on this powerful command, which is featured by the LeftClick.cyb script.

Looping
 
It is also possible to have a script perform simple looping.  Please note, CyberSecretary does not presently support loop structures such as For..Next or While..Wend.  You can, however, have one or more script sections execute repeatedly until the user presses a button to exit.  For example:

 We hope that these examples and the predefined scripts included with CyberSecretary will enable you to come up with your own ideas for how your CyberSecretary can be most helpful to you and the way you work.