VERSION 1.1.0 - QUICK REFERENCE Introduction 
Script Language Reference 
Built-In Commands Reference
 CyberSecretary
Events Triggering Scripts Reference

There are a number of ways to activate CyberSecretary scripts. Scripts can be run when requested; scripts can run at specified times of day on a daily basis or on specified days of the week; scripts can be run randomly, with varying frequency; or scripts may be triggered based on certain events occurring within Microsoft Outlook (such as opening a contact record). In addition, there is a Startup and a Shutdown script.

CyberSecretary comes with a number of predefined scripts which demonstrate her capabilities and usefulness.
 
Scheduled Scripts 

Random Scripts 

User-Controlled Scripts 
LeftClick 
RightClick 

Program-Controlled Scripts 
StartUp 
ShutDown 

Outlook-Controlled Scripts 
NewMail 
SentMail 
Outbox 
 

ReplyMail 
CreateMail 

Custom Forms 
 
OpenDiary 
OpenSent 
OpenInbox 
OpenOutbox 

ExitReadMail 
ExitSendMail 
ExitTask 
ExitPhoneCall 
ExitContact 
ExitCalendar 
ExitMeeting 

NewAppt 
OpenAppt 
OpenPastAppt 

NewContact 
OpenContact 

NewTask 
OpenTask 

NewJournal 
OpenJournal 

NewNote 
OpenNote 
 
Deleted

Sample Scripts
Scripts Folder
Schedule Folder
Outlook Folder
Menu Folder
Random Folder
 
Scheduled Scripts
 
CyberSecretary can run scripts at scheduled times of the day, either daily or on specified days of the week.  Scheduled scripts are stored in the \Schedule subfolder of the CyberSecretary program folder.  The time of day and the days of the week are controlled through the name of the script.  Scripts to be run on a daily basis are named Dlyxxxx.cyb where xxxx is the time of day that the script is to be run (24 hour time).  Scripts to be run on a particular day of the week are named Monxxxx.cyb, Tuexxxx.cyb, etc.  For example:

It is easy to create new scheduled scripts from any program, document, folder or Internet shortcut.  Simply right-click on the item in any Explorer window (or, if you have Windows 98 or Internet Explorer 4 active desktop installed, right-click on any item on the Start menu or Favorites menu) and send it to your CyberSecretary.

Your CyberSecretary will come right away, to find out on what time and what days you'd like her to open the document or folder, run the program, or access the Internet site you've chosen.  You will also get to choose whether she should ask first, or perform the task automatically.  She will then create a new script file and place it in her \Schedule folder.

In addition to opening documents, folders and Internet sites and running programs, Scheduled scripts can run any CyberSecretary command.  For example, the Interview script which is run when you install CyberSecretary gives you a chance to create scheduled scripts which will activate certain Outlook folders at selected times of the day (so you can view your calendar first thing each morning, or your Diary folder every Monday, or your phone messages right after lunch, etc.)

Scheduled scripts can also be used simply to provide you with reminders, e.g. to record a new voice mail greeting in the morning, to water your office plants, etc.

Random Scripts

Scripts which are placed in the \Random subfolder of the CyberSecretary program folder will be called randomly, at a frequency that can be controlled by the user. Random scripts should be numbered from 000.CYB to 999.CYB. The frequency a script is run depends on its number, with lower numbers called more frequently. The frequency ranges from 000.CYB (approximately five times an hour) to 010.CYB (approximately once an hour) to 100.CYB (approximately once a day) to 250.CYB (approximately once a week). Scripts above 500.CYB will almost never be called.

Note that you can include the Earliest and/or Latest directives to limit the window of time during which a random script can be run.

Please see the file RANDOM.INI for more detailed information concerning how frequently random scripts will be triggered.

User-Controlled Scripts

Scripts can be designed to be triggered by the user left-clicking or right-clicking on the CyberSecretary's desk tray icon (placed in the Windows 95 system tray). These scripts are named LeftClick.Cyb and RightClick.cyb and should be placed in the \Outlook subfolder of the CyberSecretary program folder.

LeftClick.cyb

This script is called whenever the user left-clicks on the CyberSecretary tray icon. This is useful for creating a script that can be called at user request to perform specific commands with respect to the currently open Outlook item. When used in conjunction with the BranchToItemType command, this script can perform different actions depending on what type of Outlook item is open. For example, this script could create a follow-up message when a message in the Diary folder is open; could offer to take down a phone message or create a pre-addressed letter when a contact is open; could offer to save a message as a file, print a message or set a diary reminder if a message in the Sent Items folder is open; etc.

RightClick.cyb

This script, if present, is called whenever the user right-clicks on the CyberSecretary tray icon. You might want to place the CloseOutlook and GoHome commands in this script, rather than in the Shutdown script, as a way to close Outlook and CyberSecretary.

Note: if this script is not present, right-clicking on the CyberSecretary icon brings up the CyberSecretary program menu, which is a hierarchical list of all scripts placed in the \Menu subfolder of the CyberSecretary program folder. If you right-click on any program, document, folder or Internet shortcut and send it to your CyberSecretary, you may choose to have that program, document, folder or Internet shortcut placed as a choice on your CyberSecretary's program menu, when you right-click on the CyberSecretary desk tray icon.

Program-Controlled Scripts

StartUp.cyb

This script should be placed in the \Outlook subfolder of the CyberSecretary program folder.  This script is automatically called when CyberSecretary is launched. This script is most useful for starting Microsoft Outlook, calling the ReadAppointments command to read today's schedule, and the SetAppointmentReminders command for letting your CyberSecretary know that you'd prefer to let her (rather than Microsoft Outlook) remind you of today's appointments at the appropriate time.

You can, using this script and the StartFolder command, have Outlook open more than one folder in a separate Outlook explorer. The following script directive, for example, will start the Outlook Inbox, Calendar and Contact list in separate windows.

BkgCommand=StartFolder Inbox|StartFolder Calendar|StartFolder Contacts
ShutDown.cyb
 
This script should be placed in the \Outlook subfolder of the CyberSecretary program folder.  This script is automatically called whenever all Outlook windows are closed.  This script is useful for closing CyberSecretary, after having her remind you of tomorrow's appointments using the ReadSchedule command.

Outlook-Controlled Scripts

These scripts are automatically called in response to events occurring in Microsoft Outlook, such as receiving a new mail message or opening a contact.  These scripts should be placed in the \Outlook subfolder of the CyberSecretary program folder.

NewMail.cyb

This script is called whenever a new mail message is received in the Inbox.  This script is useful with the ReadMessage command to announce the receipt of new mail and to offer to read it.

SentMail.cyb

This script is called whenever a mail message is sent (i.e. when it has been transported, and filed in the Sent Items folder).  This script is useful to perform filing and housekeeping tasks with sent messages; see, e.g., the PrintItem command, the PrintAttachments command, the MakeJournal command, the SaveFile command and the Diary command, to name a few.

Outbox.cyb

This script is called whenever a mail message is placed in the Outbox.  If your mail transport does not immediately transport sent messages, you can use this as a substitute for SentMail.cyb.  However, note that at this stage messages do not bear a sent time.

ReplyMail.cyb

This script is called whenever a new mail message is created in reply to another message.

CreateMail.cyb

This script is called whenever a new mail message is created.

Custom Forms

Scripts can be triggered by the creation of an item using a custom Outlook form.  The name of the script should begin with Open (existing instance of a form) or New (new instance of a form) followed the name of the form.  Your CyberSecretary looks for the appropriate script based on the following rules:

  1. The form's display name.
  2. The form's category.
  3. The root portion of the name of the template (i.e. without the .OFT extension).
  4. The last portion of the message class.
For example, the script New While You Were Out.cyb will be triggered whenever a new "While You Were Out" message is created, using the template supplied with Microsoft Outlook.

This feature makes it possible to design a custom Outlook form and an associated script, which can perform certain tasks whenever a user creates or opens an instance of the custom Outlook form.

OpenDiary.cyb

This script is run whenever a mail message in the Diary folder is opened.  This folder is created by your CyberSecretary, for storing sent mail messages with follow-up dates using the Diary command.  This script is useful in conjunction with the FollowUp command to follow up on mail messages.

OpenSent.cyb

This script is run whenever a mail message in the Sent Items folder is opened.  This script is useful to perform filing and housekeeping tasks with sent messages; see, e.g., the PrintItem command, the PrintAttachments command, the MakeJournal command, the SaveFile command and the Diary command, to name a few.

This script illustrates the flexibility of your CyberSecretary.  These tasks can be performed automatically whenever a message is sent, if they are placed in the SentMail script; they can be performed automatically only when a sent message is opened, if they are placed in the OpenSent script; or they can be performed only when a request is made if they are placed in the LeftClick script.

OpenInbox.cyb

This script is run whenever a mail message in the Inbox is opened.  Commands which are useful in this script are Flag (for setting a due date for response); ReplyToSender or ReplyToAll in conjunction with CopyAttachments to include any attached files in your response (this is useful if you wish to edit the attached file and return it to the sender); PrintItem or PrintAttachments.

OpenOutbox.cyb
 
This script is run whenever a mail message in the Outbox is opened.

ExitReadMail.cyb

This script is run whenever a mail message in the Inbox is closed (provided there are no other Outlook items currently open).  This script is useful for automatically moving on to the next task.

ExitSendMail.cyb

This script is run whenever a mail message in the Sent Items folder is closed (provided there are no other Outlook items currently open).  This script is useful for automatically moving on to the next task.

ExitTask.cyb

This script is run whenever an Outlook task item (or a Journal item representing a task) is closed (provided there are no other Outlook items currently open).  This script is useful for automatically moving on to the next task.

ExitPhoneCall.cyb

This script is run whenever a Journal item for a phone call is closed (provided there are no other Outlook items currently open).  This script is useful for automatically moving on to the next task after a phone call is complete.

ExitContact.cyb

This script is run whenever a contact item is closed (provided there are no other Outlook items currently open).  This script is useful for automatically moving on to the next task.

ExitCalendar.cyb

This script is run whenever an Outlook appointment item is closed (provided there are no other Outlook items currently open).  This script is useful for automatically moving on to the next task.

ExitMeeting.cyb

This script is run whenever a Journal representing an appointment is closed (provided there are no other Outlook items currently open).  This script is useful for automatically moving on to the next task.

NewAppt.cyb

This script is run whenever a new appointment item is created.

OpenAppt.cyb

This script is run whenever an existing appointment item is opened before the ending time for the appointment has been reached.  This is useful with the PrintAttachments command, if, for example, you've attached messages or files to the appointment item that will be necessary for the appointment.

OpenPastAppt.cyb
 
This script is run whenever an existing appointment item is opened after the ending time for the appointment has passed.  This is useful with the MakeJournal command to record the appointment in your Journal.

NewContact.cyb

This script is run whenever a new contact item is created.

OpenContact.cyb
 
This script is run whenever an existing contact item is opened.  It is useful for presenting choices such as creating pre-addressed documents using the CreateDocument command; recording a phone message using the PhoneMessage command; logging a phone call with the MakeJournal command; or getting an Internet map with the GetMap command.

NewTask.cyb

This script is run whenever a new task item is created.

OpenTask.cyb
 
This script is run whenever an existing task item is opened.

NewJournal.cyb

This script is run whenever a new Journal item is created.

OpenJournal.cyb
 
This script is run whenever an existing Journal item is opened.

NewNote.cyb

This script is run whenever a new Outlook note is created.

OpenNote.cyb
 
This script is run whenever an existing Outlook note is opened.

Deleted.cyb
 
This script is run whenever an Outlook item is deleted.  This script is useful for offering to print an item (with the PrintAttachments command) or save an item as a file (using the SaveFile command) before it is deleted.  Note: You can use the BranchToItemType command to perform different actions with different types of deleted items.

Sample Scripts

CyberSecretary comes with a number of useful scripts which demonstrate her capabilities.  You can learn a lot about how to extend CyberSecretary to perform other tasks by studying these scripts.  These scripts illustrate many of CyberSecretary's built-in commands, as well as features of the scripting language such as branching, looping, presenting lists to the user, controlling buttons and screen position, limiting the time a script can run, etc.

CyberSecretary creates a number of folders beneath her program folder.  Each of these folders is used for storing scripts, and each such folder has a different purpose.  The folders created, and their purpose, are:

Sample Scripts in the Scripts Folder

The Scripts folder includes a number of scripts that can be run by double-clicking on them.  It is a general purpose place for storing scripts.  The scripts begin with the Interview script, which introduces you to your CyberSecretary, and during which some of these scripts will be copied to the Schedule folder to be run at specified times of the day.

Note: You can also use the Windows 95 System Agent to launch scripts.  The Scripts folder is a good place to put such scripts.  Using the Windows 95 System Agent offers three advantages.  First, scripts can be run even when CyberSecretary is not running.  Second, scripts can be run even if their scheduled time is past.  Third, scripts can be run only after the computer has been idle for a certain time.  If you do use System Agent to launch scripts, please note the following. System Agent is not able to launch documents (such as CyberSecretary scripts) directly. However, CyberSecretary comes with a freeware utility OPEN.EXE (her present to you!), which is copied to your Windows folder. This utility can be followed by the name of a document or URL (not just a CyberSecretary script!), making it possible to use System Agent to launch scripts or even visit Internet sites.

\Scripts\Interview.CYBThis script is lengthy and not reproduced here.  Yes, even the CyberSecretary installation "interview" is managed by a script!  This script illustrates the power and flexibility of scripts.  A close look will reveal that it contains several otherwise-undocumented commands that are primarily useful to manage the installation, e.g. ScheduleScript and BranchToVersion.

\Scripts\Calendar.CYBThis script shows the Outlook Calendar folder.  The Interview script offers the user a chance to have this script run at specified times of the day; this script is copied to the Schedule folder for each selected time

[Init]
Caption=Calendar
Message=Here is your calendar, <YourName>.
Icon=Calendar
XPos=95
YPos=95
BkgCommand=ShowFolder Calendar
Wait=4

\Scripts\Contacts.CYB This script shows the Outlook Contacts folder.  The Interview script offers the user a chance to have this script run at specified times of the day; this script is copied to the Schedule folder for each selected time.

[Init]
Caption=Phone Messages
Message=Here are your phone messages, <YourName>.
Icon=Rolodex
XPos=95
YPos=95
BkgCommand=ShowFolder Contacts
Wait=4

\Scripts\Diary.CYB This script shows the Diary folder, which is automatically created by your CyberSecretary, and where she will file messages for follow-up using the Diary command.  The Interview script offers the user a chance to have this script run at specified times of the day; this script is copied to the Schedule folder for each selected time

[Init]
Caption=Diary
Message=Here is your diary, <YourName>. What would you like to work on now?
Icon=Diary
XPos=95
YPos=95
BkgCommand=ShowFolder Diary
Wait=4

\Scripts\Journal.CYB This script shows the Outlook Journal folder.  The Interview script offers the user a chance to have this script run at specified times of the day; this script is copied to the Schedule folder for each selected time.
 
[Init]
Caption=Journal
Message=Here is your journal, <YourName>. What can I help you with?
Icon=Journal
XPos=95
YPos=95
BkgCommand=ShowFolder Journal
Wait=4

\Scripts\Mail Calendar.CYBThis script mails the user's calendar for the next 90 days.  During the interview, the user is given a chance to do this at a scheduled time; if the user answers yes, this script is copied to the Schedule folder.  The first time this script is run, the user is prompted for the name of the recipient; this information is remembered and need not be supplied thereafter.

[Init]
Caption=Mailing Calendar
Message=Just a moment while I prepare to mail your schedule, <YourName>. . .
Icon=Calendar
Picture=Straight
XPos=10
YPos=10
BkgCommand=MailCalendar 90
Wait=3
NextSection=Finished

[Finished]
Message=I've mailed your schedule for the next <Days> days to <Recipient>, <YourName>.
Picture=Smile
Icon=MailMessage

\Scripts\Inbox.CYB This script shows the Outlook Inbox.  The Interview script offers the user a chance to have this script run at specified times of the day; this script is copied to the Schedule folder for each selected time.

[Init]
Caption=Inbox
Message=Here is your inbox, <YourName>. Let me know if you'd like to add anything to your task list.
Icon=Mailnews
XPos=95
YPos=95
BkgCommand=ShowFolder Inbox
Wait=4

\Scripts\Stock Price.CYBThis script gets the current stock price for a selected stock.  The interview script offers to perform this task at selected times of the day; copies are placed in the Schedule folder for the selected times.  The first time the script is run, it requests the ticker symbol for the stock; this is saved in the script.  Requires an Internet connection.

[Init]
Caption=Get Stock Price
Message=Just a moment while I get the current price of <StockName>, <YourName>.
Icon=Bank
BkgCommand=GetStockPrice

Sample Scripts in the Schedule Folder

This script illustrates a script scheduled to perform a task at a specified time.  Note: the Interview script may copy some of the scripts in the Scripts folder to this folder, and schedule them to run at the appropriate time.

\Schedule\Dly1010.CYBThis scheduled script is run at 10:10 a.m. each day and accesses today's Dilbert cartoon (requires an Internet connection).  The user is first prompted and can answer yes or no, or can "snooze" the script by right-clicking on the CyberSecretary dialog or pressing the Windows Menu button.  Note: you can easily create scripts to visit other Internet sites on schedule, by right-clicking on any Internet shortcut and sending it to your CyberSecretary.

[Init]
Caption=Dilbert Time!
Message=Would you like to see today's Dilbert now, <YourName>?
XPos=10
YPos=10
YesButton=[Dilbert]
NoButton=Null
Icon=News

[Dilbert]
Message=I'm getting Dilbert now, <YourName>.
BkgCommand=http://www.unitedmedia.com/comics/dilbert/

Sample Scripts in the Outlook Folder

\Outlook\Startup.CYBThis script is run whenever you launch CyberSecretary.  This is a useful script for performing such start-of-day tasks as reading today's schedule, setting appointment reminders and opening Microsoft Outlook.

[Init]
Caption=Hello!
Message=Good <TimeOfDay>, <YourName>. Why don't you enjoy your coffee while I start Microsoft Outlook for you?
Icon=Coffee
Sound=Hello
BkgCommand=StartFolder Inbox|StartFolder Calendar|StartFolder Contacts
NextSection=Today

[Today]
Caption=Checking Schedule
Message=Just a moment, <YourName>, while I check your schedule for today . . .
BkgCommand=ReadSchedule Today|SetAppointmentReminders
NextSection=Early

[Early]
Message=You're certainly here early this morning, <YourName>.
Wait=3
Wink=Yes
Latest=08:00
 
\Outlook\Reminder.CYBThis script is run whenever a scheduled item's reminder time comes.  These reminders are stored in the Registry and are set by the SetAppointmentReminders command, which should be included in the StartUp script.
 
[Init]
Caption=Time For Your Appointment!
Message=It's time for your <EventTime|h:mm ampm> appointment, <Subject>, at <Location>, <YourName>. Would you like me to open this item?
Icon=Alarm
Sound=Phone
XPos=50
YPos=50

\Outlook\LeftClick.CYBThis is a powerful and flexible script which is run whenever you left-click on your CyberSecretary's tray icon.  This script uses the BranchToItemType command to perform context-specific actions depending on what kind of Outlook item is currently open.  Note in particular the [ContactOptions] section, which branches to different script sections depending on the user's selection.

[Init]
BkgCommand=BranchToItemType CurrentItem

[Inbox]
XPos=5
YPos=5
Message=What would you like to do with this message, <YourName>?
Icon=Compose
List=InboxOptions
OKButton=Null
CancelButton=Null

[InboxOptions]
Reply To Message=ReplyToAll CurrentItem|DeleteItem OriginalMessage
Add To Task List=CreateTask CurrentItem
NextSection=Finished

[Contact]
XPos=5
YPos=5
Caption=What would you like to do with this contact, <YourName>?
Icon=Contact
List=ContactOptions
OKButton=Null
CancelButton=Null

[ContactOptions]
Log Phone Call=[Phone Log]
Take Message=[Message]
Compose Letter=CreateDocument Letter.dot

[Phone Log]
Message=Let me create an entry in <Contact>'s phone log, <YourName>.
Icon=Contact
Wait=3
BkgCommand=MakeJournal|CloseItem|ShowJournalItem StartTimer
NextSection=Finished

[Message]
Message=Let me take down this phone message, <YourName>.
Icon=Contact
BkgCommand=PhoneMessage
NextSection=Finished

[PastAppointment]
Message=Let me add this appointment to your Journal, <YourName>.
Icon=Calendar
Wait=3
BkgCommand=MakeJournal LastItem|CloseItem LastItem

[Diary]
Caption=Follow Up
Message=Would you like to send a follow-up reminder, <YourName>?
Icon=Compose
XPos=5
YPos=5
YesButton=[FollowUp]
NoButton=null

[FollowUp]
Message=Here's a follow-up message to <Contact>, <YourName>.
Wait=3
BkgCommand=FollowUp LastItem|DeleteItem OriginalMessage

[None]
Caption=Add Journal Item
Message=Let me create a new Journal item, <YourName>.
Icon=Journal
XPos=10
YPos=10
BkgCommand=MakeJournal Blank

[Finished]
Message=Let me know if I can help you with anything else, <YourName>.
Icon=Coffee
Wait=3
Wink=Yes

\Outlook\NewMail.CYBThis script is run whenever a new mail message is received.  This can be used to announce the receipt of new mail, and to offer to "read" it, print it, etc.  Note: This script shows how CyberSecretary can be displayed as an icon (avatar) rather than a full dialog.  In this case, if the user presses Enter within 5 seconds, the next section of the script is run; otherwise the script exits.

[Init]
Caption=New Mail
Sound=NewMail
XPos=95
YPos=5
Message=
Wait=5
NextSection=NewMail

[NewMail]
Caption=Read Mail Message
Message=You have a new mail message concerning <Subject>from <Contact>.|Would you like me to open it, <YourName>?
BkgCommand=ReadMessage
Icon=MailMessage
Picture=Talk

\Outlook\OpenContact.CYBThis script is run whenever the user opens an Outlook Contact item, and displays a number of choices appropriate for a contact item.

[Init]
XPos=90
YPos=10
Sound=Default
Message=What would you like me to do with this contact, <YourName>?
OKButton=Null
CancelButton=Null
Icon=Contact
List=ContactList

[ContactList]
Log Phone Call=MakeJournal CurrentItem
Compose Mail Message=[MailMessage]
Phone Message=PhoneMessage|CloseItem
Write Letter=CreateDocument Letter.dot
Send Fax Message=CreateDocument Fax.dot
Get A Street Map=[Map]

[Map]
Message=Hold on a second, <YourName>, while I find <Subject> on the map . . .
Icon=Map
BkgCommand=DisplayMap CurrentItem
Wait=5

[MailMessage]
Caption=Compose Mail Message
Message=Just let me know when you're finished, <YourName>.
BkgCommand=ComposeMessage
Icon=Compose
Wait=3

\Outlook\OpenSent.CYBThis script is run whenever a message in the Sent Items folder is opened.  This script offers to perform a number of useful tasks with sent mail messages.  It is similar to the SentMail script, which runs whenever a mail message is sent; during the interview, the user is given a choice as to which approach is preferred and will delete the other script.

[Init]
XPos=95
YPos=5
Caption=Print Mail Message
NextSection=File
Icon=Printer
Wait=0
Message=Would you like me to print the message, <YourName>?
YesButton=PrintItem CurrentItem
Default=No
NoButton=Null

[File]
Caption=File Mail Message
Icon=FileCabinet
Message=Would you like me to file this message, <YourName>?
YesButton=[FileCurrent]
NoButton=null
Default=Yes
NextSection=Journal

[FileCurrent]
Caption=Filing Mail Message
Message=Just a moment, <YourName>. . .
BkgCommand=SaveFile CurrentItem
Icon=FileCabinet
NextSection=Journal

[Journal]
Caption=Creating Journal Entry
Message=Would you like to create a Journal entry, <YourName>? If so, you can put your notes here.
InputLines=6
List=|Sales|Marketing|Personnel|Financial|Legal
Icon=Journal
YesButton=GetJournal CurrentItem|RemoveAttachments JournalItem|LinkItem LastFile to JournalItem
NoButton=Null
Default=Yes
NextSection=Diary

[Diary]
Caption=Diary Reminder
Message=Would you like me to set a diary reminder, <YourName>?
List=DiaryOptions
OKButton=null
NextSection=Finished

[DiaryOptions]
None/Delete Item=DeleteItem CurrentItem
7 Days=Diary CurrentItem to 7
14 Days=Diary CurrentItem to 14
21 Days=Diary CurrentItem to 21
28 Days=Diary CurrentItem to 28
60 Days=Diary CurrentItem to 63
90 Days=Diary CurrentItem to 91

[Finished]
Message=Okay, <YourName>, just call me if you need me for anything else . . .
Wink=Yes
Icon=Coffee
Wait=0

\Outlook\OpenInbox.CYBThis script is run if you open a message in your Inbox.  This script uses the ClearPriorMessages command to check for any prior messages in the Inbox that are included in the current message, and offers to delete them.

[Init]
BkgCommand=ClearPriorMessages CurrentItem

\Outlook\ExitPhoneCall.CYBThis script is run whenever an Outlook Journal item representing a phone call (i.e. a phone log entry) is closed, provided there are no other Outlook items open.

[Init]
XPos=95
YPos=9
Caption=Finished Phone Call
Message=Now that you're finished with that phone call, <YourName>, what would you like to do next?
Icon=Telephone
List=Choices
OKButton=null
CancelButton=null
NextSection=Finished

[Choices]
Messages=ShowFolder Contacts
Inbox=ShowFolder Inbox
Task List=ShowFolder Tasks
Diary=ShowFolder Diary
News=http://my.yahoo.com

[Finished]
Caption=Finished Phone Call
Message=Just let me know if you need anything else, <YourName>.
Wink=Yes
Icon=Coffee

\Outlook\Shutdown.CYBThis script is run whenever you close all Outlook explorers.  This is a good place to include commands for such end-of-day tasks as reading tomorrow's schedule.

[Init]
XPos=50
YPos=50
Caption=Goodnight!
Message=<YourName>, is it okay for me to go home now?
Icon=Briefcase
YesButton=[Tomorrow]
NoButton=[Abort]

[Tomorrow]
Caption=Tomorrow's Schedule
Message=Just a moment, <YourName>, while I check your schedule for tomorrow . . .
Icon=Calendar
BkgCommand=ReadSchedule Tomorrow
NextSection=Close

[Close]
Message=Just a moment, <YourName>, while I close Outlook . . .
Picture=Straight
Icon=Outlook
BkgCommand=CloseOutlook
NextSection=ShutDown

[Abort]
Message=I guess I'll go back to my desk, <YourName>. Just whistle if you need me . . .
Icon=Coffee
Wait=2

[ShutDown]
Message=Goodbye, <YourName>, it's been fun working with you!
Icon=Briefcase
Picture=Smile
Sound=Goodbye
Wink=Yes
BkgCommand=GoHome

Sample Scripts in the Menu Folder

\Menu\Calculator.CYBThis script is a top-level option when right-clicking your CyberSecretary tray icon, and brings up the Windows calculator.

[Init]
Caption=Calculator
BkgCommand=Calc.EXE
Icon=Calculator
Message=Here's your Calculator, <YourName>.
XPos=95
YPos=50

\Menu\Expense Accounting.CYBThis script is offered as a choice when you right-click on your CyberSecretary's tray icon.  This calls the PostExpense command to add an expense item to the Expenses folder (created by your CyberSecretary), or creating an expense report.

[Init]
BkgCommand=PostExpense

\Menu\Files.CYBThis script opens the user's personal documents folder in an Explorer window.  Note: the location of this folder on the user's machine is determined by the CyberSecretary installation program.

[Init]
BkgCommand=EXPLORER.EXE C:\MY DOCUMENTS
Icon=FileCabinet
Message=Here are your files, <YourName>.
Caption=Opening Files
XPos=90
YPos=10

\Menu\Play A Game.CYB This script offers to play a yes/no guessing game.  An example game file is included; you can create others.  Your CyberSecretary "learns" each time it plays the game, and saves this information – she gets better with practice!

[Init]
Message=Okay. Why don't you think of a president, <YourName>, and I'll guess who it is. Are you ready?
Sound=Click
YesButton=Game Presdnts
NoButton=[No]

[No]
Message=Well, get ready, <YourName>! Are you ready?
Sound=Error
YesButton=Game Presdnts
NoButton=[No]

\Menu\Tell Me The Time.CYBThis script is offered as a choice if you right-click on your CyberSecretary's tray icon.  The function is self-explanatory, but illustrates the macro capabilities of the Message directive.

[Init]
Message=It's <Time|h:mm ampm>, <YourName>.
Wait=4
Icon=Clock

\Menu\Internet\Search Engines.CYBThis script is offered as a choice when you right-click on your CyberSecretary's tray icon.  This script brings up a dialog for submitting an Internet search to your favorite Internet search engine.  Note: the Internet search URL's are stored in the Registry during the installation interview.

[Init]
Message=What would you like me to search for, <YourName>?
Icon=Find
Sound=Clicks
InputLines=1
OKButton=SearchInternet
List=Yahoo|Altavista|Infoseek|Lycos
CancelButton=Null
NextSection=Search

[Search]
Message=I'm running your search now, <YourName>. I hope this is what you are looking for.

\Menu\Tools\My Personnel File.CYBThis script is offered as a choice when you right-click on your CyberSecretary's tray icon.  This opens your CyberSecretary's program folder, allowing you to review, edit, create, rename, delete, etc. scripts.  The actual path is added as part of the installation program.

[Init]
XPos=90
YPos=90
Message=I'm getting my personnel file, <YourName>.
Icon=Folder
BkgCommand=EXPLORER.EXE C:\PROGRAM FILES\CYBERSECRETARY

\Menu\Tools\Contact My Agency.CYB This script is offered as a choice when right-clicking on the CyberSecretary tray icon.  This script opens a mail message addressed to the author.

[Init]
Caption=Contact My Agency
Message=I'm ready to take a message to Mr. Heindl now, <YourName>.
Icon=Compose
XPos=10
YPos=10
BkgCommand=mailto:walter.heindl@usa.net

\Menu\Tools\Visit My Agency.CYBThis script is offered as a choice if you right-click on your CyberSecretary's tray icon.  This command opens the CyberSecretary web site in your browser.  Requires an Internet connection.

[Init]
Message=I'm accessing my agency's web site now, <YourName>.
Icon=Earth
BkgCommand=http://www.voicenet.com/~wheindl/cybersecretary.htm

Sample Scripts in the Random Folder

\Random\030.CYBThis script displays a message randomly.  Note the Latest= directive will cause this script not to execute after 10:30 a.m.

[Init]
Caption=Coffee Break!
Message=I'm going to the coffee cart, <YourName>. I'll bring you back a cup of coffee.
Icon=Coffee
XPos=10
YPos=10
Latest=10:30
Wink=True

\Random\040.CYBThis script displays a message randomly.  Note the use of the Earliest= and Latest= directives to limit this script to run only between 2:00 and 5:00 p.m.

[Init]
Caption=Break Time!
Message=I'm going to the cafeteria now, <YourName>. I'll bring you back a cookie.
Icon=Cookie
Earliest=14:00
Latest=17:00
Wink=True

\Random\050.CYBThis script displays a message randomly.  Note the use of the Earliest= directive to limit this script to run only after 6:00 p.m.

[Init]
Message=Gee, you're working awfully late, <YourName>. Don't you think we should go home now?
Wink=True
Icon=Keys
Earliest=18:00

\Random\250.CYBThis script runs randomly approximately once a week, and checks the CyberSecretary web site for an update script.  If a new update script is found, that script is run.  These scripts will be used to inform of product updates, to maintain Registry information (e.g. Internet URL's), and to provide tips and tricks.  Requires an Internet connection.

[Init]
BkgCommand=GetUpdate