Sophisticated Circuits PowerKey Pro 600 User Manual

1: Introduction Page 1
PowerKey Pro
Model 600
User Manual
by Jamie Green
PowerKey Pro designed by Amar Singh
PowerKey Software by Richard Elmore
Balloon Help by Beverlee Heiszler
Moral Support by Alora Dunlap
Copyright ©1995-97 Sophisticated Circuits, Inc. All rights reserved.
MANPKP6-0297
Page 2 1: Introduction
IMPORTANT SAFETY INSTRUCTIONS
When using your telephone equipment, basic safety precautions should always be followed to reduce the risk of fire, electric shock and injury to persons, including the following:
1. Read and understand all instructions.
2. Follow all warnings and instructions marked on the product.
3. Unplug this product from the wall outlet before cleaning.
4. Do not allow anything to rest on the power cord. Do not locate this product where the cord will be abused by persons walking on it.
5. Do not overload wall outlets and extension cords, as this can result in the risk of fire or electric shock.
6. Unplug this product and refer servicing to qualified service personnel under the following conditions: when the power supply cord or plug is damaged or frayed, if liquid has been spilled into the product, if the product has been exposed to rain or water, or if the product has been dropped or damaged.
SAVE THESE INSTRUCTIONS
FCC Requirements
1. The Federal Communication Commission (FCC) has established Rules which permit this device to be directly connected to the telephone network. Standardized jacks are used for these connections. This equipment should not be used on party lines or coin phones.
2. If this device is malfunctioning, it may also be causing harm to the telephone network; this device should be disconnected until the source of the problem can be determined and until repair has been made. If this is not done, the telephone company may temporarily disconnect service.
3. The telephone company may make changes in its technical operations and procedures; if such changes affect the compatibility or use of this device, the telephone company is required to give adequate notice of the changes. You will be advised of your right to file a complaint with the FCC.
4. If the telephone company requests information on what equipment is connected to their lines, inform them of: a. The telephone number to which this unit is connected.
b. The ringer equivalence number. c. The USOC jack required. d. The FCC Registration Number.
Items (b) and (d) are indicated on the label. The Ringer Equivalence Number (REN) is used to determine how many devices can be connected to your telephone line. In most areas, the sum of the REN’s of all devices on any one line should not exceed five (5.0). If too many devices are attached, they may not ring properly.
Service Requirements
In the event of equipment malfunction, all repairs should be performed by our Company or an authorized agent. It is the responsibility of users requiring service to report the need for service to our Company or to one of our authorized agents. Service can be obtained at Sophisticated Circuits, Inc., 19017 120th Ave NE, Suite 106, Bothell, WA 98011, 206-485-7979.
FCC Statement
This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference will not occur in a particular installation. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one or more of the following measures:
Reorient or relocate the receiving antenna.
Increase the separation between the equipment and receiver.
Connect the equipment into an outlet on a circuit different from that to which the receiver is connected.
Consult the dealer or an experienced radio/TV technician for help.
Shielded cables and I/O cords must be used for this equipment to comply with the relevant FCC regulations. Changes or modifications not expressly approved in writing by Sophisticated Circuits, Inc. may void the user’s authority to
operate this equipment.
Industry Canada Equipment Attachment Limitations
NOTICE: The Canadian Industry Canada label identifies certified equipment. This certification means that the equipment meets certain telecommunications network protective, operational and safety requirements. The Department does not guarantee the equipment will operate to the user’s satisfaction.
Before installing this equipment, users should ensure that the equipment meets certain telecommunications network protective, operational and safety requirements. The Department does not guarantee the equipment will operate to the user’s satisfaction.
1: Introduction Page 3
Before installing this equipment, users should ensure that it is permissible to be connected to the facilities of the local telecommunications company. The equipment must also be installed using an acceptable method of connection. In some cases, the company’s inside wiring associated with a single line individual service may be extended by means of a certified connector assembly (telephone extension cord). The customer should be aware that compliance with the above conditions may not prevent degradation of service in some situations.
Repairs to the certified equipment should be made by an authorized Canadian maintenance facility designated by the supplier. Any repairs or alterations made by the user to this equipment, or equipment malfunctions, may give the telecommunications company cause to request the user to disconnect the equipment.
Users should ensure for their own protection that the electrical ground connections of the power utility, telephone lines and internal metallic water pipe system, if present, are connected together. This precaution may be particularly important in rural areas.
Caution: Users should not attempt to make such connections themselves, but should contact the appropriate electric inspection authority, or electrician, as appropriate.
The Load Number (LN) assigned to each terminal device denotes the percentage of the total load to be connected to a telephone loop which is used by the device, to prevent overloading. The termination on a loop may consist of any combination of devices subject only to the requirement that the Load Numbers of all the devices does not exceed 100. The Load Number of this unit is 6.
Copyright Notice
The PowerKey Pro manual, program, product design and design concepts are copyrighted, with all rights reserved to Sophisticated Circuits, Inc. Your rights are subject to the copyright laws of the United States of America. Under the copyright laws, this manual may not be copied, in whole or part, including translation to another language or format, without the express written consent of Sophisticated Circuits, Inc.
Trademarks
PowerKey and PowerPad are registered trademarks of Sophisticated Circuits, Inc. Apple, AppleScript, Macintosh, Mac, PowerBook and Power Macintosh are registered trademarks, and Balloon Help, Finder and System 7 are trademarks of Apple Computer, Inc. PowerPC is a trademark of International Business Machines Corporation. Frontier is a trademark of UserLand Software, Inc. QuicKeys is a trademark of CE Software, Inc.
Page 4 1: Introduction
Contents
Introduction 7
System Requirements 8 What’s in the Box 8 Using This Manual 9
Installing PowerKey Pro 11
Hardware Installation 12
Preparing for Installation 13 Connecting the Power Cords 14 Connecting the ADB Cables 16 Connecting the Phone Cables 18 Turning On Your System 19
Software Installation 20
Hardware Configuration 21
Using PowerKey Pro 23
Starting Up the System 24 Shutting Down the System 24 Scheduled Events 25
The PowerKey Schedule 26 Creating an Event 28 A Pair of Hot Key Events 32 A “Monitor Saver” Event 35 Phone Startup Events 38
Reference 45
Software Components 46 PowerKey Editor 47
Schedule Windows 47
PowerKey Editor Menus 49
File Menu 49 Edit Menu 49 Schedule Menu 50
1: Introduction Page 5
Importing and Exporting 52 Hardware Setup 54 Preferences 56 The Event Editor 58 Event Triggers 61
Time Triggers 61
System Triggers 63 Trigger Qualifiers 68 Event Actions 73
Appendices 83
1. Using “Classic” PowerKey 84
Installing PowerKey 84
2. Using Multiple PowerKeys 86
Installing Multiple PowerKey Pros 86
Installing PowerKey Pro and “Classic” PowerKey 87
Using PowerKey Software with Multiple PowerKeys 88
3. Restarting Crashed Servers 89
Automatic Restarts 89
Telephone Control 90
Other Features 92
4. Default Schedules 94
Creating a Default Schedule File 94
Using a Default Schedule File 95
5. Using AppleScript 96
Running AppleScripts in Events 96
Controlling PowerKey Pro with AppleScript 97
6. Troubleshooting 100
7. How To Reach Us 104
Index 105
Page 6 1: Introduction
1: Introduction Page 7
Chapter 1
Introduction
Thank you for purchasing PowerKey® Pro!
PowerKey Pro Model 600 is a “smart” power strip that can control an entire Macintosh® system. You can start up your computer and all (or just some) of your peripherals with one keystroke. You can start up your system or control individual outlets with a phone call. You can create schedules to control your system at any time of the day or night.
The PowerKey Pro unit includes six independently-switchable outlets that allow you to control your peripherals individually. It connects to your phone line, and can pick up the phone and switch outlets based on dialing tones you send it.
With the included software, you can turn on your peripherals with the touch of a key, or automatically turn off your monitor when the computer is idle. You can set up timed events to automate many day-to-day tasks, for example to turn on your computer before you get to work or run nightly unattended backups. You can even automatically restart your computer when it crashes!
Page 8 1: Introduction
System Requirements
PowerKey Pro Model 600 works with any desktop Macintosh or compatible except the original Mac® and Mac Plus (because they do not have an ADB port). It works with any Apple keyboard, and most third-party keyboards. Its phone ring and tones detection features work with any standard analog phone line (see Appendix 4, Troubleshooting, for more information on phone lines).
PowerKey Pro can also work with some models of PowerBook® computers that have an ADB port. You can use the “power on” button on PowerKey Pro to start your system and peripherals.
The PowerKey software requires System 7™ or later, and runs in native PowerPC® mode on the Power Macintosh. It sup­ports Balloon Help™, Apple Events and AppleScript®.
What’s in the Box
The PowerKey Pro package includes the following:
PowerKey Pro Model 600 unit
SCI cable for connecting PowerKey Pro to your computer
and keyboard
Phone cable for connecting PowerKey Pro to your tele-
phone line
Software disk for controlling PowerKey Pro
This manual
• Postage-paid registration card
If you’re missing any of these items, please notify your sup­plier.
1: Introduction Page 9
Using This Manual
We recommend that you read this manual as follows:
1. Carefully follow the instructions in Chapter 2, Installing
PowerKey Pro.
2. Skim the first part of Chapter 3, Using PowerKey Pro.
If you want to use PowerKey Pro’s advanced Scheduling features:
3. Follow along with the Creating an Event tutorial in Chapter
3.
4. Look through the other example Events in Chapter 3 to
find those that will be useful to you.
5. Skim Chapter 4, Reference, to learn the details of the
Scheduling features.
As you read the manual, you will encounter symbols next to some paragraphs:
This symbol denotes a paragraph that contains important informa­tion regarding the current topic. Be sure to read these notes carefully.
This symbol denotes a paragraph that contains a handy tip, or an idea for using a feature.
Page 10 1: Introduction
2: Installing PowerKey Page 11
Chapter 2
Installing
PowerKey Pro
PowerKey Pro consists of two primary components, hardware and software. The hardware unit controls the outlets and keeps track of time when the computer is turned off. The software organizes the scheduled events and controls the outlets when the computer is turned on.
In order to use PowerKey Pro, you must install both the hardware and software.
Hardware Installation 12
Preparing for Installation 13
Connecting the Power Cords 14
Connecting the ADB Cables 16
Connecting the Phone Cables 18
Turning On Your System 19 Software Installation 20
Hardware Configuration 21
Page 12 2: Installing PowerKey
Hardware Installation
PowerKey Pro Model 600 has six outlets, each of which switches independently. It also has six switches, which you can use to manually switch each outlet. In addition, the large Sophisticated Circuits logo on the front of the unit functions as a “Power On” key to start up your system.
Outlet 2
Switches
For manual control of each outlet.
Outlet 4
Outlet 6
Outlet 1
Outlet 3
Outlet 5
“Power On” Key
At the back of PowerKey Pro are two phone ports and a special “SCI” port.
This is not a “SCSI” port, which is used to connect hard disks to your Mac. It is a custom port used only by PowerKey Pro. “SCI” stands for “Sophisticated Circuits, Inc.”
SCI Port
Connects to the computer via SCI Cable.
Line Port
Connects to the phone line.
Phone Por
t
Connects t
o
the telephone
.
2: Installing PowerKey Page 13
Preparing for Installation
Determine your computer’s switch type
With your computer off, press the “Power On” key (usually found at the top or upper right corner of your keyboard). If your computer starts up it has Soft Power, otherwise it has Hard Power. This informa- tion will be important later when you are configuring the PowerKey software.
If your computer started up in the above test (i.e. it has Soft Power), shut it down before continuing.
Unplug your system
1. Make sure that all the power switches on your Macintosh
and peripherals are turned off.
2. Disconnect the power cords for your Macintosh and
peripherals from the wall outlet or power strip.
3. Disconnect the keyboard cable from the Apple
Desktop Bus (“ADB”) port on the back of your computer. The ADB port is labelled with the icon shown at the right.
4. If you have a modem, unplug the phone cable leading
from the wall to the modem.
Page 14 2: Installing PowerKey
Connecting the Power Cords
1. Plug the power cord for PowerKey Pro into the wall outlet, or if you prefer, a surge protector. If you use an uninterruptable power supply (UPS), you may be able to plug PowerKey Pro into it; check your UPS manual for more information.
Be careful not to accidentally press the “Power On” key on the front of the unit, as this can turn on your outlets prematurely. If this happens, you can unplug PowerKey Pro from the wall for a few seconds to reset it.
Plug in your computer
2. Connect the power cord for your computer into one of PowerKey Pro’s outlets. The PowerKey software defaults to Outlet 1, so we recommend that for most purposes.
Remember which outlet you plug the computer into. You will need to tell the PowerKey software where the computer is, so it can correctly start up and shut down the system.
Plug in your peripherals
3. Plug the power cords for your peripherals into the other outlets of PowerKey Pro, as desired.
2: Installing PowerKey Page 15
Example
This example shows PowerKey Pro connected to a Power Mac 6100, a printer and a modem:
We designed PowerKey Pro so that there is room between outlets for many typical “power bricks” such as those used by modems. If you still don’t have enough room, you can use a short extension cord. Many computer stores sell very short cords just for this purpose.
If you plug your monitor into PowerKey Pro instead of your com­puter, it can be controlled separately. Chapter 3 describes a sample Event which will turn off your monitor when the computer is idle.
Page 16 2: Installing PowerKey
Connecting the ADB Cables
The diagram below shows an example setup:
(1) SCI Cable. (2) Branching connector.
The cable that comes with PowerKey Pro is not a standard ADB cable. One end of this cable is colored purple, and labelled with our company’s logo (as shown to the right). This connector will only fit into the SCI Port on the PowerKey unit.
Connect PowerKey Pro to the computer
1. Plug the single end of the SCI Cable (see note 1 in the diagram above) into the SCI Port on PowerKey Pro.
2. Plug the branching end of the SCI Cable into the ADB port on the back of your computer.
(1)
(2)
2: Installing PowerKey Page 17
Connect the keyboard to the SCI Cable
3. Plug the keyboard cable into the branching connector on the SCI Cable (see note 2 in the diagram above). If you have other ADB devices, they should be connected in a “chain,” with one end of the chain joining to the branching connector.
The keyboard must be connected to the branching connector on the SCI Cable in order for PowerKey Pro to work.
Page 18 2: Installing PowerKey
Connecting the Phone Cables
This section is optional. If you do not wish to use PowerKey Pro’s telephone features, you may skip this section.
The diagram below shows an example setup:
Connect PowerKey Pro to the phone line
1. Plug the cable running from your phone outlet into the Line Port on the back of PowerKey Pro (labelled with the symbol at the right).
Connect the modem to PowerKey Pro
2. Plug the supplied phone cable into the Phone Port on the back of PowerKey Pro (labelled with the symbol at the right), and into the line port on your modem or phone.
3. If you have both a phone and modem, you can chain them together as shown in the diagram above.
2: Installing PowerKey Page 19
If you wish to connect multiple devices that don’t have “pass through” ports, you may use a phone line splitter (available at any phone or electronics store).
Turning On Your System
1. Turn on the power switches on your computer and periph­erals.
2. Press the “Power On” key on the keyboard. PowerKey Pro will turn on its outlets, and your entire system will start up!
As you can see, the PowerKey Pro hardware can start up the system. The PowerKey software is required to shut it down. The next section shows you how to install the software and configure it for use.
Page 20 2: Installing PowerKey
Software Installation
Open the Installer
1. Insert the PowerKey Pro disk into your floppy drive. The disk’s window will appear.
2. Double-click the icon labelled “Installer.” The Installer window will open.
Install the software
3. Make sure your startup disk is shown in the Destination Disk panel. If it is not, click the Switch Disk button until it is
shown.
4. Click Install. The Installer will ask if it can quit any open applications before it begins. Make sure you don’t have any unsaved documents, then click Continue.
When the installation is complete, the Installer will restart your computer.
See Chapter 4, Software Components, for a description of the items that are installed.
2: Installing PowerKey Page 21
Hardware Configuration
Open the PowerKey Editor
1. Pull down your Apple menu, and select “PowerKey Editor”. The PowerKey Editor application will open, displaying the Schedule Window for your PowerKey Pro unit.
2. Select “Hardware Setup...” from the Edit menu. The Hardware Setup dialog box will appear.
A picture of your PowerKey Pro will appear in the dialog box, along with list of the unit’s outlets. The num­bers on the outlets match the labels printed on the unit.
Page 22 2: Installing PowerKey
See Appendix 2, Using Multiple PowerKey Pro Units, if you have more than one PowerKey Pro connected to your computer.
Name your PowerKey Pro unit and outlets
3. If you wish, type a name into the Unit Name field at the top of the Hardware Setup dialog box.
4. Type names into the fields for each outlet on the PowerKey Pro unit.
It’s a good idea to give your outlets names that describe what’s plugged into them. For example, names like “Monitor,” “Printer,” etc. come in handy when creating Events to control the outlets.
Set up the CPU outlet
5. To the sides of the outlet list, there is a set of radio buttons labelled “CPU.” Set the button corresponding to the outlet your computer is plugged into. If your computer is plugged into the wall, select “None.”
Be sure to correctly set the CPU radio button. It is essential in order for PowerKey Pro to start up and shut down the system.
6. If your computer has Soft Power as determined in Prepar­ing for Installation, make sure the “Always On” box for the
computer’s outlet is checked.
You can also check this box for other outlets that you may wish to leave on. This is useful for devices such as lamps which you wish to control manually.
7. Click OK, then choose “Quit” from the File menu.
If you haven’t already, please take a moment to fill out your registra­tion card now. It will help us give you quicker technical support if you need it, and keep you informed about product updates.
That’s all there is to it! The next chapter shows you how to use your PowerKey Pro, and offers a brief tutorial on some of its more powerful features.
3: Using PowerKey Page 23
Chapter 3
Using PowerKey Pro
PowerKey Pro is ready to use as soon as you install both the hardware and software. It is pre-configured to act as an “intelligent power strip.” You can easily use it to start up and shut down your entire system.
PowerKey Pro also has advanced scheduling features that let you automate your system. You can start up your computer and shut it down at any time of the day or night, control peripherals from the keyboard or telephone and save energy when the system is idle.
Starting Up the System 24 Shutting Down the System 24 Scheduled Events 25
The PowerKey Schedule 26 Creating an Event 28 A Pair of Hot Key Events 32 A “Monitor Saver” Event 35 Phone Startup Events 38
Page 24 3: Using PowerKey
Starting Up the System
PowerKey Pro watches the “Power On” key on your computer’s keyboard when the computer is off. To start up your computer system, simply press this key. Your computer and all peripherals plugged into your PowerKey Pro will turn on, and your computer will start up normally.
You can customize how PowerKey Pro responds to this key. For example, you may wish to leave your printer off most of the time, and only turn it on when you need it. This is done by modifying an Event in the PowerKey Editor. See Scheduled Events, later in this chapter, for more information on modifying PowerKey Events.
You can also start up your system by pressing the “S” button on the front of the PowerKey Pro unit.
Shutting Down the System
To shut down your computer, select “Shut Down” from the Finder’s Special menu. The PowerKey software will allow the system software to shut down normally; PowerKey Pro will then turn off the computer and all peripherals plugged into it automatically.
Some newer models of Macintosh can also be shut down by pressing the “Power On” key while the computer is turned on.
If this is all you will be using PowerKey Pro for, you don’t need to read any further. But if you want to use PowerKey Pro’s advanced Scheduled Event features, read on.
3: Using PowerKey Page 25
Scheduled Events
PowerKey Pro can do much more than simply start up and shut down your computer. It includes a sophisticated schedule of Events which can automate system startup and shutdown, and control your system in a variety of ways.
An Event consists of two parts, the Trigger (when the Event will be executed) and the Actions (what the Event will do). The Trigger can also include Qualifiers, which restrict when the Event will execute (for example, to turn on your computer in the morning, but not when you’re away on vacation).
The PowerKey Schedule keeps a list of your Event Triggers, and watches for them to “activate.” When a Trigger activates, it performs the list of Actions for that Event.
Note that several Events can have the same type of Trigger. You can set up several Events with the same type of Trigger but different Qualifiers, to make the Events behave differently at different times of the day or week.
The next few pages take you step by step through a series of examples, showing you how to customize your PowerKey setup and make use of its advanced features.
Page 26 3: Using PowerKey
The PowerKey Schedule
PowerKey Schedules are created using the PowerKey Editor application. If you followed the standard installation instruc­tions, PowerKey Editor can be found in your Apple menu. Select it from this menu, and the following window will appear.
You’ll notice that there are already two Events in the Schedule, entitled “User Start Up” and “User Shut Down.” Once you’ve learned how to edit Events, you can customize these in any way you like.
The top line of an Event shows its name. The next line is an English description of its Trigger (when the Event will hap­pen). The icon to the left of each Event shows the Trigger type at a glance.
Each Event in the Schedule also has a small triangle at its left side. Click on the triangle for the Event named “User Start Up.” An additional line will appear beneath it.
3: Using PowerKey Page 27
When the arrow in an Event is turned down, the Event’s Actions (what the Event will do) are shown. In this case, the only Action is to start up the system.
Double-click on the Event named “User Start Up” (or select it and click the Edit... button). The Event Editor will appear.
As you can see, the Event Editor shows the same information as the Schedule window, plus controls for changing it. We don’t need to modify this Event now, so click the Cancel button to close the Event Editor.
Be careful if you modify or replace the “User Start Up” and “User Shut Down” Events. It is possible to create a Schedule that won’t let you turn your computer on.
For this reason, PowerKey Pro includes an emergency override feature. Press the “Power On” key slowly four times, waiting about a half-second between presses. Hold the key down on the last press. This “short-short-short-long” sequence will turn on the computer and all the outlets.
Page 28 3: Using PowerKey
Creating an Event
For our first example, let’s assume that you want to automati­cally turn on your computer before you arrive for work each weekday. To do this, we’ll create a new Event which turns on your computer at 8:55 each weekday morning.
Create a new Event
1. To create a new Event, click the New... button in the Schedule window or select “New Event...” from the Schedule menu. The Event Editor will appear, showing a blank Event.
Name the Event
You may choose any name you wish for an Event, up to 31 characters long. Event names have no special meaning; they are simply a description you can give an Event to help you understand what it’s doing.
2. For this example, type “Morning Wakeup” into the Event Name field.
3: Using PowerKey Page 29
Select the Trigger type
The Trigger type is selected from the pop-up menu below the English descrip­tion of the Trigger. There are several types of Triggers; these are described in detail in the next chapter.
3. We want this Event to be executed every weekday morning, so select “Days of Week” from the Trigger pop- up menu.
Set the days and time
Some fields will appear in the blank area below the menu, allowing you to choose when the Trigger will activate.
4. We want this Event to be executed on weekdays, so check the boxes marked M, T, W, T and F (if they are not already checked).
5. To set the time for a Trigger, click in the time field next to the day check boxes. The portion of the time you clicked on is highlighted, and a pair of arrow buttons appears. You can change the highlighted value by clicking on these arrows, or by pressing the up and down arrow keys on your keyboard, or by typing in the desired values with the number keys. Click on the next value to edit it, or press the tab key or left and right arrow keys.
Page 30 3: Using PowerKey
You’ll notice that the English description above the Trigger pop-up menu is updated as you make changes to the Trigger. This helps you make sure the Event will be executed when you intend, and helps you catch mistakes.
Create a new Action
6. Click the New Action... button. A dialog box will appear.
We want to start up the whole system, so choose “Start Up Computer” from the list. Click OK (or double-click on the “Start Up Computer” line). The Start Up Computer Action Editor will appear.
The Start Up Computer Action Editor may look slightly different than the one shown above, depending on how you configured your PowerKey unit in the Hardware Setup dialog box.
3: Using PowerKey Page 31
Turn the outlets on
The Start Up Computer Action Editor shows one line of information for each outlet on your PowerKey Pro. The computer’s outlet is not selectable, but you can decide which other outlets should turn on with it.
7. Make sure the pop-up menus for your important peripher­als are set to “On.” In many cases, you’ll want to turn all the outlets on.
You can also set up delays in a Switch Outlets Action, to make some outlets turn on before others. This is useful if, for example, you have an older style hard disk that must spin up before the computer turns on. Unless you need this feature, leave all the delay fields at “0.”
Finish the Event
8. Click OK. The Action now appears in the Action List. Click OK again, and your Event appears at the top of the Schedule window. Click the small triangle to show the Action list, and double-check to make sure all the informa­tion is correct. Your Event is now ready to use!
Page 32 3: Using PowerKey
A Pair of Hot Key Events
One of the handy features of PowerKey Pro is the ability to control outlets from the keyboard. Our next example is a pair of Events that turn your outlets on or off when you press 1­option-M and 1-option-P.
For this example, we’ll assume your modem is plugged into Outlet 3, which you’ve named “Modem.” Your printer is plugged into Outlet 4, which you have named “Printer.”
Create an Event
1. Click the New... button in the Schedule window, and name the new Event “Toggle Modem.”
Create the Trigger
2. Select “When Hot Key Pressed” from the Trigger menu. Click in the When keystroke is pressed: field to highlight it. Press 1-option-M. The keystroke will appear in the field.
Create the Action
3. Click the New Action... button, and create a Switch Outlets Action. The Switch Outlets Action Editor will appear.
3: Using PowerKey Page 33
4. Choose “Toggle” from the pop-up menu for the Modem outlet.
5. Click OK to save the Action, and OK again to save the Event.
Duplicate the Event
The second Event will be very similar to the first one, so we can take advantage of the Mac’s cutting and pasting abilities.
6. Select the “Toggle Modem” Event in the Schedule Win­dow. Select “Copy” from the Edit menu; then “Paste.” There will now be two copies of the Event.
Modify the duplicate Event
7. Double-click on one of the Events. Change the name to “Toggle Printer.” Click on the When keystroke is pressed: field, and press 1-option-P.
8. Double-click on the “Toggle Modem” Action. Select “No Change” from the Modem menu, and “Toggle” from the Printer menu.
Page 34 3: Using PowerKey
9. Click OK to save the Action, and OK again to save the Event. Both Events should now appear in the Schedule Window.
Setting up Hot Key Events to toggle your outlets is a good idea before you experiment with your own Events. If you accidentally make an Event which turns off the monitor at the wrong time, you can easily turn it back on with these Events.
3: Using PowerKey Page 35
A “Monitor Saver” Event
Now we’re ready for something a little more powerful. This Event will automatically turn off your monitor when you haven’t used your computer for 20 minutes. When you want to start using it again, simply move the mouse and it will turn your monitor back on.
For this example, we’ll assume your monitor is plugged into Outlet 2, which you’ve named “Monitor.”
Create an Event
1. Click the New... button in the Schedule window, and name the new Event “Monitor Saver”.
Create the Trigger
2. Select “When System is Idle” from the Trigger menu. Type “20” into the Minutes field. Make sure the Mouse Move- ment, Mouse Clicks and Keystrokes boxes are checked. This tells PowerKey Pro to watch for all those activities.
Create the Actions
This Event will use several Actions. The first will turn off the monitor, the second will wait for activity to resume, and the third will turn the monitor back on.
Page 36 3: Using PowerKey
3. Click the New Action... button, and select “Switch Outlets” from the list. The Switch Outlets Action Editor will appear.
Select “Off” from the Monitor pop-up menu, and click OK. The Action will appear in the Action list.
4. Click the New Action... button again, and select “Wait” from the list. The Wait Action Editor will appear.
The Wait Action type is useful whenever you need some sort of pause or delay between Actions. The radio buttons at the top of the dialog box let you choose what type of wait you wish to use.
5. For this Event, we want to wait for the user to start using the computer, so click the Wait for user activity radio button.
3: Using PowerKey Page 37
You’ll notice that there are several check boxes below the radio buttons. They match the check boxes you saw in the Trigger above. You can check these boxes to select which activity types you wish PowerKey Pro to watch.
6. Since this Action is used with a System Idle Trigger, just check the Same as Trigger box. Then click OK to finish this Action. The Action will appear in the Action List.
7. Click the New Action... button again. Select “Switch Out­lets” from the list, and select “On” in the Monitor pop-up menu. Click OK, and all three Actions should appear in the Action List.
If your Actions are not in the order shown above, you can select them and drag them into the correct place.
As you can see, each Event can include several Actions. Each Action is performed as soon as the one before it finishes.
8. Click OK, and the Event appears in your Schedule Window. Click the small triangle, and all of the Actions will appear. Your Event will automatically execute the next time you don’t use your computer for 20 minutes!
If your computer has the ability to Sleep, you can substitute a Sleep System Action for the Monitor Off, Wait and Monitor On Actions described in steps 3-7. See Chapter 4, Event Actions, for more information on the Sleep System Action.
Page 38 3: Using PowerKey
Phone Startup Events
Our final example shows how you can create several Events that work together. These Events will let you turn on your computer with a phone call after entering a “security code”, and automatically shut down when you’re done.
For this example, we’ll assume you will be using Apple Remote Access to communicate with your computer. Your monitor is plugged into Outlet 2, which you’ve named “Moni­tor.” Your modem is plugged into Outlet 3, which you’ve named “Modem.”
You will create three Events for this task. The first Event will answer the phone when the phone rings, but only after busi­ness hours. The second Event will start up your computer when you enter your security code, and the third Event will shut it down when you are finished.
Create the Answer Phone Event
1. Click the New... button in the Schedule window, and name the new Event “Remote Access Answer.”
Create the Trigger
2. Select “When Phone Rings” from the Trigger menu. Type “4” into the Number of Rings field.
3: Using PowerKey Page 39
For this example, you can ignore the Ring Pattern pop-up menu. This option works with your phone company’s “distinc­tive ringing” feature to respond only to chosen calls. See Chapter 4, Trigger Types, for more information on this feature.
Create the Qualifier
If you share your phone line between your phone and modem, you may want to keep PowerKey Pro from answering the phone during business hours.
3. Click the Qualifiers... button. The Qualifier Editor will appear.
We want to limit this Event to execute only after business hours, so check the Time Range box.
4. Set the Time Range Options to between 5:00 PM and 9:00 AM.
Click OK. The Trigger text will now show the Qualifier information.
Create the Action
5. Click the New Action... button, and select “Answer Phone” from the list.
6. Click OK to save the Event. Click the spin triangle to see the whole Event.
Page 40 3: Using PowerKey
Create the Start Up Event
7. Click the New... button in the Schedule window, and name the new Event “Remote Access Start Up”.
Create the Trigger
8. Select “Phone Tones Heard” from the Trigger menu. Type a security code such as “4242#” into the field.
Create the Action
9. Click the New Action... button, and select “Start Up Com­puter” from the list. The Switch Outlets Action Editor will appear.
When you are accessing your computer from home, you don’t need your monitor or other peripherals, but you will need your modem. Turn the Modem outlet “On” and the rest “Off.”
3: Using PowerKey Page 41
10. Click OK to save the Action, and again to save the Event. Click the spin triangle to see the whole Event.
Create the Shut Down Event
11. Click the New... button in the Schedule window, and name the new Event “Remote Access Shut Down”.
Create the Trigger
12. Select “When System is Idle” from the Trigger menu. Type “10” into the Minutes field. Uncheck the Mouse Movement,
Mouse Clicks, and Keystrokes boxes. Check the Phone On Hook box.
Page 42 3: Using PowerKey
Create the Qualifier
13. Click the Qualifiers... button. The Qualifier Editor will appear. Check the How Started box. Check the Phone Tones box, then click OK.
Create the Action
14. Click the New Action... button, and select “Shut Down Computer” from the list. The Switch Outlets Action Editor will appear. Select “Off” in each outlet’s menu, click OK, then click OK again to save the Event.
All three Events should now be complete. The “Remote Access Answer” Event will pick up the phone when you call in. When you type your security code on the phone keypad, the “Re­mote Access Start Up” Event will start up the computer. You can then wait a couple of minutes for your computer to finish starting up, then call in with Apple Remote Access. The “Remote Access Shut Down” Event will shut it down ten minutes after you hang up!
3: Using PowerKey Page 43
Page 44 3: Using PowerKey
4: Reference Page 45
Chapter 4
Reference
This chapter contains detailed information about the PowerKey software.
Software Components 46 PowerKey Editor 47
Schedule Windows 47
PowerKey Editor Menus 49
File Menu 49 Edit Menu 49
Schedule Menu 50 Importing and Exporting 52 Hardware Setup 54 Preferences 56 The Event Editor 58 Event Triggers 61
Time Triggers 61
System Triggers 63 Trigger Qualifiers 68 Event Actions 73
Page 46 4: Reference
Software Components
When you install the PowerKey software, the following items will be placed on your hard disk:
PowerKey Extension
This extension is located in the Extensions folder in your System Folder. This is the heart of the PowerKey software. It runs in the background, keeping track of your Schedule and communicating with the PowerKey Pro hardware. It watches for each Event’s Trigger to activate and executes the Actions when it does.
PowerKey Editor
This application is normally installed in your Apple Menu Items folder, but it may be moved anywhere you find conve­nient. It lets you configure your PowerKey Pro hardware and software, and create and edit Events. The rest of this chapter shows you how to use all the features of the PowerKey Editor.
PowerKey Folder
This folder is located in your system’s Preferences folder. It contains the PowerKey Preferences file, as well as a Schedule file for each PowerKey connected to your computer. If you use any External Actions, they will also be stored here.
There are also several “extras” on the PowerKey Pro disk that are not installed by the installer. They contain information and examples of how to control PowerKey Pro with AppleScript, how to use PowerKey Pro with Retrospect, how to write External Actions, etc. They are found in the “PowerKey Extras” folder on the master disk.
4: Reference Page 47
PowerKey Editor
The PowerKey Editor application allows you to configure your PowerKey Pro and create scheduled Events. Normally, this application can be found under the Apple menu, but it may be placed in any location you find convenient.
Schedule Windows
When you open the PowerKey Editor application, the current Schedule for each PowerKey connected to your computer is displayed in a separate window. Each Schedule is made up of several Events.
Spin triangles
You can expand or collapse each Event in a Schedule (to show or hide its Actions) by clicking on the small triangle to the left of the Event.
You can also expand or collapse all Events in a Schedule by holding down the Option key when you click on a triangle.
Page 48 4: Reference
Event buttons
The buttons at the bottom of the Schedule window operate just like the “New Event,” “Edit Event” and “Delete Event” menu items in the Schedule menu. (You can also edit an Event by double-clicking on it.) See the Schedule Menu section later in this chapter for more information.
4: Reference Page 49
PowerKey Editor Menus
File Menu
Import Schedule..., Export Schedule...
These commands allow you to save Events on your hard disk, and copy them back at a later date. See the Importing and Exporting section later in this chapter for more information.
Page Setup...
This command displays a standard Page Setup dialog box, allowing you to change printer settings.
Print... (
11
11
1
-P)
This command prints the contents of the Schedule window.
Quit (
11
11
1
-Q)
This command quits the PowerKey Editor application.
Edit Menu
Undo (
11
11
1
-Z), Cut (
11
11
1
-X), Copy (
11
11
1
-C), Paste (
11
11
1
-V), Clear,
Select All
These are the standard clipboard editing commands, as found in many Mac applications. You can cut, copy and paste text in any of the dialog boxes. You can also cut, copy and paste Events in Sched­ule windows and Actions in Action Lists.
Page 50 4: Reference
Hardware Setup...
This command displays the Hardware Setup dialog box. See the Hardware Setup section later in this chapter for more information.
Preferences...
This command displays the Preferences dialog box. See the Preferences section later in this chapter for more information.
Schedule Menu
New Event... (
11
11
1
-N)
This command creates a new Event in the Schedule and opens the Event Editor dialog box. See the Event Editor section later in this chapter for more information.
Edit Event...
This command opens the Event Editor dialog box for the selected Event in the Schedule window. See the Event Editor section later in this chapter for more information.
Delete Event
This command removes the selected Event in the Schedule window.
Suspend Event/Resume Event
This command allows you to disable a selected Event. A disabled Event will appear with an ‘X’ over it, and will not be executed until you select “Resume Event.”
4: Reference Page 51
Execute Event
This command immediately executes the selected Event in the Schedule window. The Trigger and Qualifiers are ignored, and all Actions are performed in sequence. This command is useful for testing Events to make sure they operate as desired.
PowerKey units
At the bottom of the Schedule menu is a list of all PowerKey units connected to your computer. Selecting one of these items opens the Schedule window for that unit. If the window is already open, it is brought to the front.
Page 52 4: Reference
Importing and Exporting
The “Import Schedule...” and “Export Schedule...” commands in the File menu allow you to save Events to a disk file, and copy them back into the Schedule at a later date.
It’s a good idea to export your Schedule once you have it set up the way you like it. If you make changes or something gets damaged, you can import the saved file to restore your setup.
If you need to create identical schedules on multiple Systems, you can also use PowerKey’s ability to use default Schedule files. See Appendix 4, Default Schedules, for more information.
Import Schedule...
This command copies the Events in a disk file (created by the “Export Schedule...” command) into the frontmost Schedule window. A standard Open dialog box will appear, allowing you to select a Schedule file.
If the Replace Existing Schedule box is checked, all of the Events in the frontmost Schedule window will be removed, and replaced by the contents of the imported document. If it is unchecked, the Events in the imported document will be added to the Events in the frontmost Schedule window.
4: Reference Page 53
Export Schedule...
This command copies the Events in the frontmost Schedule window into a new disk file. A standard Save dialog box will appear, allowing you to name the Schedule file and place it on your disk.
If the Selected Events Only box is checked, only the Events you select in the Schedule window will be copied to the file. If it is unchecked, all the Events in the Schedule window will be copied.
You can shift-click or command-click Events in the Schedule window to select more than one for exporting.
Page 54 4: Reference
Hardware Setup
When you select “Hardware Setup...” from the Edit menu, the Hardware Setup dialog box for the frontmost Schedule win­dow is displayed.
Unit Name
This field allows you to change the name of your PowerKey. This is the name that is used as the title bar of the unit’s Schedule window and in the Schedule menu. It can be up to 31 characters long.
Outlet Names
The outlets on the PowerKey unit can be named to allow you to more easily remember which peripherals are plugged into which outlets. Each outlet’s name can be up to 15 characters long.
4: Reference Page 55
PowerKey Pro Model 600 has six outlets, each of which can be named and switched independently.
Always On check boxes
Each outlet has a check box next to it that will make the outlet “always on.” When an outlet is locked on, you cannot turn it off with Switch Outlets Actions or with the front panel switches. This is useful if you have a computer with Soft Power or other devices which you wish to keep powered at all times.
CPU radio buttons
There is a CPU radio button to the side of each outlet’s Name field. These are used to tell the PowerKey scheduling software which outlet the computer is plugged into.
Be sure to correctly set the CPU radio button. It is essential in order for PowerKey to start up and shut down the system. If your com­puter is plugged into the wall, select “None.”
Disable Front Panel Switches
If this box is checked, you will not be able to switch outlets using PowerKey Pro’s front panel switches. This is useful if you keep PowerKey Pro on the floor or back of your table, and you want to keep from accidentally pressing switches with your foot or cat.
Disabling the front panel switches is not the same as checking the “Always On” box for each outlet. If you disable the front panel switches, you can still control the outlets with Events.
Technical info
The model, serial number, firmware version and ADB address of your PowerKey Pro are shown at the bottom of this dialog box. This information is primarily useful for troubleshooting.
Page 56 4: Reference
Preferences
When you select “Preferences...” from the Edit menu, the Preferences dialog box is displayed.
Show startup icon
If this option is checked, the PowerKey software will display an icon at the bottom of your computer when you start up, to let you know it’s loading.
Warn before Scheduled Shut Down
If this option is checked, a warning dialog box will appear whenever a scheduled Event is about to shut down your computer. The computer will also beep periodically in case you are away from the monitor.
4: Reference Page 57
The dialog box will count down from one minute. When it reaches 00:00, the Event will shut down the computer. Click
Cancel if you do not wish to shut down, or Shut Down Now if you wish to skip the rest of the countdown period.
Force Restarts
If this option is checked, the PowerKey software will let the crash detection timer (see below) count down when a timed Event initiates a software restart. If the computer crashes while attempting to restart, PowerKey will run a When System Crashes Event after the crash detection timer counts to zero.
To force a restart, you must also have a When System Crashes Event in your Schedule. See Appendix 3, Restarting Crashed Servers, for more information.
Crash detection timer
This value is used by the When System Crashes Trigger (see Event Triggers later in this chapter for more information) to determine how long to wait before deciding that the computer has crashed. It can be set to any value between 30 and 1020 seconds.
Be careful not to set the delay too short, to avoid having long computations being interpreted as crashes.
Maximum Log File size
This value limits the size of the PowerKey Log file, which is created by the Add to Log Action (see Event Actions later in this chapter for more information). When an entry is added to the log file which would make it exceed this value, the top­most (oldest) items are removed.
If you limit the size of the PowerKey Log file to less than 32K, it will never grow too large to be opened by SimpleText.
Hang up after no tones heard
This value determines how long PowerKey Pro will wait for keypad tones when it answers the phone. If it doesn’t hear any tones for this period of time, it will hang up the phone.
Page 58 4: Reference
The Event Editor
When you create a new Event or open an existing one, the Event Editor dialog box is displayed.
Event Name
The Event Name is simply a description you can give to an Event. It will appear on the top line of the Event’s entry in the Schedule window. To change the name of an Event, type into the editing box at the top of the Event Editor.
Trigger text
Below the Event Name field is an English description of the Trigger, accompanied by any Qualifiers you may have set up. This description lets you see at a glance exactly when your Event will be executed.
4: Reference Page 59
Trigger
Choose an item from this pop-up menu to select the Trigger for an Event. Every PowerKey Event starts when its Trigger activates. There are several different kinds of Trig­gers, in two major categories: Time Triggers and System Triggers.
For most Trigger types, some parameters will appear below the pop-up menu; you can change the values of these parameters to set up the Trigger to activate at the appropriate times. See the Event Triggers section later in this chapter for more information.
Qualifiers...
Click this button to display the Qualifier Editor dialog box. Qualifiers give you more control over a Trigger, by restricting it to activate only under certain conditions. See the Trigger Qualifiers section later in this chapter for more information.
Action list
When an Event’s Trigger activates, the Event will perform its list of Actions, as shown at the bottom part of the Event Editor. Each Action will be performed in the order it appears in the list. You can change the order in which the Actions will be performed by dragging them up and down in the list.
New Action...
Click this button to create a new Action. A dialog box will appear asking you which type of Action you wish to create, followed by the Action Editor for the selected type of Action. See the Event Actions section later in this chapter for more information.
Page 60 4: Reference
Edit Action...
Click this button (or double-click on the Action) to edit a selected Action. The Action Editor for the selected type of Action will open.
Delete Action
Click this button to delete a selected Action.
OK, Cancel
Click one of these buttons to close the Event Editor. The OK button will save any changes you’ve made to the Event, and the Cancel button will discard any changes.
4: Reference Page 61
Event Triggers
There are two major categories of Triggers: Time Triggers and System Triggers. Time Triggers activate at specified times, and
are primarily used for creating automatic or repeating Events. System Triggers activate when something happens on the computer or phone line.
Time Triggers
Once Only
This Trigger activates at a specified date and time. After the Actions are executed, the Event is removed from the Schedule. For example, you may use this Trigger to run a script which will send a file to a colleague at a prearranged time.
To set the date and time for the Event, click on the numbers in the time and date boxes, and either type in the desired values or change them with the arrow buttons. You can also use the arrow keys on the keyboard to move through and change values.
Repeating
This Trigger activates at a specified time, and repeats at a chosen interval. For example, you may use this Trigger to run your backup program every other week.
To set the repeating interval, type a number into the editing box, and select the desired unit of time from the pop-up menu. You can choose between Minutes, Hours, Days and Weeks.
Page 62 4: Reference
To set the starting date and time for the Event, click on the numbers in the time and date boxes, and either type in the desired values or change them with the arrow buttons. You can also use the arrow keys on the keyboard to move through and change values.
By default, the starting time for a new Repeating Trigger is one hour in the future. Be sure to set this value appropriately for the Event you are creating.
Days of Week
This Trigger activates at a specified time on one or more days of every week. For example, you may use this Trigger to start up your system before you get to work each day.
To set the days of the week, click the check boxes correspond­ing to the desired days. To set the time, click on the numbers in the time and date boxes, and either type in the desired values or change them with the arrow buttons. You can also use the arrow keys on the keyboard to move through and change values.
Day of Month
This Trigger activates at a specified time on one day every month. For example, you may use this Trigger to execute a script which will run a sales report on the fourth Monday of each month.
4: Reference Page 63
To set the day of the month for the Event, type the desired number into the editing box, and select a day from the pop-up menu. You can choose between “Day” (which means “activate on the 4th of every month”) and the days of the week (which means “activate on the fourth Monday of every month”).
If the day chosen does not exist in a given month (for example, the 30th of February), the Trigger will not activate that month.
You can create Day of Month Triggers to count from the end of the month by using negative numbers. For example, putting “-2” in the example above means “activate on the second to last Monday of every month.”
To set the time, click on the numbers in the time and date boxes, and either type in the desired values or change them with the arrow buttons. You can also use the arrow keys on the keyboard to move through and change values.
System Triggers
“Power On” Key Pressed
This Trigger activates whenever you press the “Power On” key on your computer’s keyboard (or the “S” button on PowerKey Pro). For example, you may use this Trigger to start up your computer, and turn on all the peripherals you use regularly.
This Trigger will activate only while the computer is off. If you press the “Power On” key while the computer is running, no “Power On” Key Trigger will activate. (However, on some Macs, pressing this key will ask if you wish to shut down. If you do, this will cause a Shut Down Trigger to activate.)
If you delete all Events using this Trigger, the PowerKey unit will simply turn on all of its outlets and start up the computer when the “Power On” key is pressed.
Page 64 4: Reference
When Phone Rings
This Trigger activates whenever the phone rings, if a phone line is connected to PowerKey Pro. For example, you may use this Trigger to start up your computer to receive a fax or modem call.
To select the number of phone rings for a Phone Ring Event, type the desired number of rings into the text box.
PowerKey Pro also works with the “distinctive ringing” phone service available in many areas. This service gives you several phone numbers for the same line, and uses different ringing patterns to tell you which number is being called. You can set this Trigger to only activate if a chosen pattern rings. This is useful, for example, if you only wish to turn on your computer when your fax number is being called.
For more information on the distinctive ringing service, contact your local telephone company.
Phone Tones Heard
This Trigger activates whenever a certain sequence of tele­phone dialing tones is heard on the phone line. For example, you may use this Trigger to turn PowerKey Pro’s outlets on and off by typing numbers on your phone.
To choose a keypad sequence, type up to eight numbers into the Sequence field. You can also type ‘*’ or ‘#’.
When you type a sequence on your telephone that matches one of your Phone Tones Heard Triggers, PowerKey Pro will respond with a short “bleep”. If you type a sequence incor­rectly, wait at least two seconds before trying again.
4: Reference Page 65
In order for PowerKey Pro to detect tones, the phone must be taken off the hook. This can be done by your modem or answering machine, or by PowerKey Pro itself with the Answer Phone Action. See Event Actions later in this chapter for more information.
You can also send code sequences by simply picking up a phone on the same line as PowerKey Pro, even if your computer is turned off. You can control outlets from any phone in the house! Use ‘*’ and ‘#’ in your keypad sequences to avoid accidentally triggering Events when you dial a phone number that happens to match a sequence.
When Hot Key Pressed
This Trigger activates whenever a certain key combination (“hot key”) is pressed on the keyboard. For example, you may use this Trigger to turn on your printer when you press 1­option-P.
To select the keystroke, click on the “Keystroke” text box, and type the desired key combination.
Be careful not to use a keystroke for a Hot Key Event that is used by an application (for example, 1-Q).
This feature works well with the function keys on the top row of an extended keyboard.
When System is Idle
This Trigger activates whenever the system is “idle” (i.e. you are not using it) for a selected period of time. For example, you may use this Trigger to turn your monitor off when you have not been using your system for 20 minutes.
Page 66 4: Reference
To select how long the system must be idle before a System Idle Trigger activates, type the desired number of minutes into the text box.
You can customize which types of activities should be moni­tored. For example, you might wish your monitor to be turned off even if the modem is in use. To choose which types of activities should be monitored, check the desired boxes.
The “Serial port activity” check box only works with applications that use the Mac’s standard serial driver. It will not be able to detect activity with any program which installs a custom driver. If you have problems using this feature, contact your software manufacturer to see if an updated version is available.
The “Remote Access” check box only works with Apple Remote Access. If you are using another program, for example Timbuktu, check the “Serial port activity” box instead.
The “Phone On Hook” check box only works when a phone, answer­ing machine or modem is connected to the Phone Port of PowerKey Pro. It cannot detect PowerKey Pro answering the phone or other extensions on the same phone line.
When Power Returns
This Trigger activates when power is restored after a power failure. For example, you may use this Trigger to turn on a file server automatically after a power failure.
This Trigger also activates if you unplug your PowerKey unit for a while, then plug it back in.
4: Reference Page 67
At Shut Down
This Trigger activates whenever you select “Shut Down” from the Finder’s Special menu, or when another application (such as Retrospect) tells the computer to shut down. It also activates on newer Macs when you shut down by pressing the “Power On” key. Use this Trigger to turn your computer and peripher­als off when you select “Shut Down”.
When System Crashes
This Trigger activates whenever the computer crashes. When the computer is running normally, the PowerKey software “pings” the hardware every 10 seconds. If this communication fails for a period of time (specified in the Preferences dialog box), the hardware will execute any When System Crashes Events in the Schedule.
If more than one When System Crashes Events exist in the Schedule, only the first one encountered will be executed. You can use Qualifi­ers if you wish PowerKey to react differently at different times or on different days.
When Timer Expires
This Trigger activates whenever the User Timer counts down to zero. The User Timer is maintained by the PowerKey software for use by custom programs when you want greater control over crash detection. You can set the value of this timer via an Apple Event or script; see Appendix 5, Using AppleScript, for more information.
Page 68 4: Reference
Trigger Qualifiers
Qualifiers give you more control over a Trigger, by restricting it to activate only under certain conditions. For example, you can add a Qualifier to a Phone Ring Trigger that will turn on your computer during the day, but not in the evening. A Trigger will only activate if all of its Qualifiers are true.
To set up Qualifiers for an Event, first double-click on it to open the Event Editor. Click the Qualifiers... button to display the Qualifier Editor.
At the top of this window is the English description of the entire Trigger. This description will change as you add Qualifi­ers. At the left of the window is the list of possible Qualifiers; select an item in this list to edit that Qualifier.
Not all Qualifiers are available with all Triggers. Qualifiers that are redundant or do not fit with a Trigger (such as a “System Idle” Qualifier with a “When System is Idle” Trigger) do not appear in this list.
Check the box next to each Qualifier to enable it; its options will appear in the area to the right of the list. Uncheck it to disable it.
You can also double-click on a Qualifier to turn it on or off.
If a Qualifier is unchecked, its options appear dim. You can only edit a Qualifier if it is checked.
4: Reference Page 69
You can use one, several or all Qualifiers in any combination. This enables you to set up complex Triggers; for example, you can create an Event which will turn on your computer when the phone rings (with a Phone Ring Trigger), but only during business hours (with a Time Range Qualifier set to 9 AM to 5 PM, and a Days of Week Qualifier set to Monday through Friday).
Time Range
This Qualifier restricts the Trigger to activate only during a selected part of the day. For example, you can use this Quali­fier to limit an Event to execute only during (or after) business hours.
To set the starting and ending times, click on the numbers in the boxes, and either type in the desired values or change them with the arrow buttons. You can also use the arrow keys on the keyboard to move between values and change them. If you set the starting time to be later than the ending time, then the Qualifier will be true after the starting time until the ending time the next day.
Date Range
This Qualifier restricts the Trigger to activate either inside or outside of a specified date range. For example, you can use this Qualifier to limit an Event to execute only during your vacation.
Page 70 4: Reference
If the “is/is not” pop-up menu is set to “is,” the Qualifier is true between the starting and ending dates. If it is set to “is not,” the Qualifier is true before the starting date, and after the ending date.
To set the starting and ending dates, click on the numbers in the boxes, and either type in the desired values or change them with the arrow buttons. You can also use the arrow keys on the keyboard to move between values and change them.
Days of Week
This Qualifier restricts the Trigger to activate only on one or more days of the week. For example, you can use this Qualifier to limit an Event to execute only on weekdays.
To set the days of the week, click the check boxes correspond­ing to the desired days.
System Idle
This Qualifier restricts the Trigger to activate only if the system has been idle for more than (or less than) a chosen amount of time. For example, you can use this Qualifier to limit an Event to execute only when you haven’t used the mouse or keyboard for 20 minutes.
This Qualifier is ignored if the computer is turned off when a Trigger activates.
4: Reference Page 71
If the “more than/less than” pop-up menu is set to “more than,” the Qualifier is true when activity has not occurred for the chosen period. If it is set to “less than,” the Qualifier is true when activity has occurred in the chosen period.
To select the period that is checked for activity, type the desired number of minutes into the text box.
As with the System Idle Trigger, you can customize which types of activities should be monitored. To choose these, check the desired boxes.
The “Serial port activity” check box only works with applications that use the Mac’s standard serial driver. It will not be able to detect activity with any program which installs a custom driver. Contact your software manufacturer for more information.
The “Remote Access” check box only works with Apple Remote Access. If you are using another program, for example Timbuktu, check the “Serial port activity” box instead.
The “Phone On Hook” check box only works when a phone, answer­ing machine or modem is connected to the Phone Port of PowerKey Pro. It cannot detect PowerKey Pro answering the phone or other extensions on the same phone line.
How Started
This Qualifier restricts the Trigger to activate only if the system was last started in a chosen manner (i.e. by the “Power On” key, phone ring, Timed Event, etc.). For example, you can use this Qualifier to limit an Event to execute only if the system was turned on by an incoming phone call.
This Qualifier is ignored if the computer is turned off when a Trigger activates.
Page 72 4: Reference
To choose which types of startup should cause the Qualifier to be true, check the desired boxes.
System Running
This Qualifier restricts the Trigger to activate only if the computer is (or is not) running normally.
If the “is/is not” pop-up menu is set to “is,” the Qualifier is true when the computer is running normally. If it is set to “is not,” the Qualifier is true when the computer is turned off, or if has crashed, or if the PowerKey software is not running.
PowerKey Pro will only decide that a computer is not running after the Crash Detection Timer reaches zero. Until then, no Events with a System Is Not Running Qualifier will be executed.
This Qualifier is primarily useful for making sure Events only run when the computer is crashed. For example, you can create an Event which will restart your computer when the phone rings, but not if it’s running normally. See Appendix 3, Restarting Crashed Servers, for more information.
4: Reference Page 73
Event Actions
When an Event’s Trigger activates, the Event will execute its list of Actions, as shown in the scrolling list at the bottom part of the Event Editor. Each Action will be executed in the order it appears in the Action List for the Event.
If you need to move an Action to execute earlier or later, select it in the list and drag it to the desired position.
To create an Action, click the New Action... button below the Action list. A dialog box will appear asking you which type of Action you wish to create.
When you select an Action and click Create, a dialog box will appear that allows you to edit the parameters of an Action. Each dialog box is different, and is described below.
Only Switch Outlets, Start Up Computer, Restart, Answer Phone and Wait Actions can be executed when the computer is turned off.
New Actions are added to the end of the Action list, unless an Action is selected, in which case it will be inserted before the selected Action.
Page 74 4: Reference
Switch Outlets
This Action turns on or off one or more outlets on your PowerKey. Each switchable outlet appears in the Action Editor. The same Action can turn some outlets on and others off.
The computer’s outlet, as well as any outlets set to “Always On,” will not be settable in the Switch Outlets Action Editor. To switch the computer’s outlet, use the Start Up Computer and Shut Down Computer Actions described below.
Each outlet is accompanied by a pop-up menu with four options. Selecting “On” turns the outlet on. Selecting “Off” turns the outlet off. Selecting “Toggle” switches the outlet; if it is currently on, turn it off; if it is off, turn it on. Selecting “No Change” leaves the outlet in its current state.
Each outlet also has a delay; you can use delays to cause some outlets to be turned on before others. This is primarily useful when starting up or shutting down the system. See the Start Up Computer and Shut Down Computer Actions described below.
4: Reference Page 75
Start Up Computer
This Action is similar to the Switch Outlets Action, but also turns on your computer. Each switchable outlet appears in the Action Editor, and can be controlled as described in the Switch Outlets Action above.
Any outlets set to “Always On” will not be settable in the Start Up Computer Action Editor, and the computer’s outlet will be locked “On.” You can, however, set a delay for the computer’s outlet, which will cause the computer to start up after the peripherals come on.
Shut Down Computer
This Action is similar to the Switch Outlets Action, but also shuts down your computer. Each switchable outlet appears in the Action Editor, and can be controlled as described in the Outlet Action above.
The computer’s outlet, as well as any outlets set to “Always On,” will not be settable in the Shut Down Computer Action Editor. You can, however, set a delay for the computer’s outlet (if it’s not set to “Always On”), which will cause the computer’s outlet to turn off after the peripherals.
Page 76 4: Reference
Restart
This Action restarts your computer. If the computer is running, this Action operates exactly like the Finder’s “Restart” item in the Special menu.
This Action can also restart a crashed computer. If the com­puter is plugged into one of PowerKey Pro’s outlets, this Action will turn off that outlet, wait ten seconds, then turn it back on. If the computer is not plugged into PowerKey Pro, this Action will attempt to restart it by sending the command­control-“power on” key sequence.
See Appendix 3, Restarting Crashed Servers, for more information on using the Restart Action.
Sleep System
This Action puts your computer to sleep. It operates exactly like the Finder’s “Sleep” item in the Special menu.
This Action is only available on computers that have the ability to go to sleep, such as the Power Mac 7500, 8500 and 9500.
4: Reference Page 77
You can use this Action to automatically put your computer to sleep if you haven’t been using it. To do this, create an Event with a “System Idle” Trigger. Set the idle time to any desired value, and create a “Sleep System” Action.
To wake a sleeping computer, press any key on the keyboard.
Execute a Script
This Action executes any OSA-compliant script, such as an AppleScript or UserLand Frontier™ script. You can write scripts to perform just about any task you can imagine.
When you create a Script Action, a standard Open File dialog box will appear. Find your desired script in the scrolling list. Select the script and click Open (or double-click on the script) to select it.
If your script opens a dialog box to display or request information, you will not be able to run it as a compiled script. This is because the PowerKey Extension runs as a background-only application, which cannot draw windows. To run such a script, save it as an “applica­tion” in the Script Editor, and run it with the Open File Action.
Script Actions will lose track of a script if you move or rename it in the Finder. You will have to edit the Actions and select the script again.
See Appendix 5, Using AppleScript, for information on creating scripts to control PowerKey Pro’s outlets and Schedules.
Page 78 4: Reference
Execute a QuicKey™
This Action activates a QuicKey or Sequence created with CE Software’s QuicKeys™. This Action is only available if you have QuicKeys installed in your system. This gives you a simple means to automate many tasks when you don’t need a complex script.
When you create a QuicKey Action, a list of your currently defined QuicKeys appears. Select the Keyset that contains your QuicKey from the pop-up menu above the list. Select the desired QuicKey from the list and click OK (or double-click on the QuicKey).
Type a Keystroke
This Action “types” a key combination as if you typed it on the keyboard. You can use this Action to do menu commands or type a character for use by any application.
When you create a Keystroke Action, a dialog box appears. Select the text box, and type the desired keystroke.
4: Reference Page 79
Wait
This Action serves multiple duty. It can wait a specified number of seconds, or it can wait for the user to start or stop using the computer. You can use this Action to delay subse­quent Actions in an Event as desired.
When you create a Wait Action, a dialog box appears.
At the top of the dialog box is a set of radio buttons. Choose which type of wait you wish to perform from this set. Below the dotted line is a series of check boxes.
To wait for a certain period of type, select the Wait (n) seconds button. Type the number of seconds into the field.
To wait until for activity to occur on the computer, select the Wait for user activity button. You can choose which activities to monitor with the check boxes below.
To wait until activity on the computer stops, select the Until system has been idle for (n) minutes button. You can choose which activities to monitor with the check boxes below.
The Wait for user activity ability is primarily useful in conjunction with a System Idle Trigger. You can check the Same as trigger box to make this Action match its Trigger.
Page 80 4: Reference
Open File
This Action will open any file, as if you double-clicked on it in the Finder. You can use this Action to run applications (includ­ing AppleScripts saved as applications) or open documents. This is useful if you wish to start an automated procedure when you’re not at your computer.
When you create an Open File Action, a standard Open File dialog box will appear. Find your desired file in the scrolling list. Select the file and click Open (or double-click on the file) to select it.
Open File Actions will lose track of a file if you move or rename it. You will have to edit the Actions and select the file again.
Quit Current Application
This Action simply quits the frontmost application. It is designed to complement the Open File Action described above. You can use this with the Open File Action described above to open an application (such as a backup program), then quit when it is finished.
To ensure that the application you wish to quit is the frontmost application, execute an Open File Action before the Quit Action. If the application is already open, this Action will bring it to the front.
4: Reference Page 81
Mount SCSI Devices
This Action looks at your SCSI bus and mounts all devices it can find. You can use this Action to mount hard disks that need time to “spin up” when they are turned on, and are not ready when the computer first starts up.
Answer Phone
This Action makes PowerKey Pro take the phone line off hook. You can create Events to pick up the phone when it rings, and use the Phone Tones Heard Trigger to toggle outlets or start up the computer by typing tones on your telephone keypad.
PowerKey Pro will automatically hang up the phone if it doesn’t hear any tones for a period of time. You can set this time in the Preferences dialog box; see Preferences earlier in this chapter for more information.
Add to Log
This Action writes a line of text at the end of a log file. When you create an Add to Log Action, a dialog box will appear. You can type any message you wish into this box.
When the Action is performed by an Event, this message, along with the current date and time, will be written at the end of the “PowerKey Log” file, which resides in the PowerKey Folder.
Page 82 4: Reference
External Actions
PowerKey allows you to create your own Action types to perform any special task you need. External Actions appear at the bottom of the list of choices when you click on New Ac-
tion...
When you create an External Action, a dialog box appears. External Actions can receive one parameter, a line of text. Enter the text, if any, and click OK.
External Actions are simply miniature programs that perform any task you wish to write. To add an External Action to the New Action... list, place it in the PowerKey Folder in the Preferences folder of your System Folder.
The PowerKey Pro software disk contains information on writing your own External Actions.
Appendices Page 83
Appendices
1. Using “Classic” PowerKey 84
Installing PowerKey 84
2. Using Multiple PowerKeys 86
Installing Multiple PowerKey Pros 86
Installing PowerKey Pro and “Classic” PowerKey 87
Using PowerKey Software with Multiple PowerKeys 88
3. Restarting Crashed Servers 89
Automatic Restarts 89
Telephone Control 90
Other Features 92
4. Default Schedules 94
Creating a Default Schedule File 94
Using a Default Schedule File 95
5. Using AppleScript 96
Running AppleScripts in Events 96
Controlling PowerKey Pro with AppleScript 97
6. Troubleshooting 100
7. How To Reach Us 104
Index 105
Page 84 Appendices
Appendix 1 Using “Classic” PowerKey
The PowerKey version 3 software is fully compatible with the original PowerKey. If you upgrade from version 1.x or 2.x, you will need to rebuild any scheduled Events you had before. Some of the features of the version 3 software will not be available, as they depend on features of the PowerKey Pro hardware: The “When Phone Rings” Trigger, the “When Power Returns” Trigger, and the “Switch Outlets” Action.
Installing PowerKey
The diagram below shows an example setup.
(1) PowerKey ADB cable. (2) Branching connector.
(1)
(2)
Appendices Page 85
Prepare for Installation
1. Disconnect your system, as described in Chapter 2, Prepar-
ing for Installation.
Plug in your system
2. If your computer has Soft Power as described in Chapter
2, Preparing for Installation, plug it into the wall outlet. If your computer has Hard Power, plug it into one of PowerKey’s outlets.
3. Plug the power cables for your peripherals into
PowerKey’s outlets.
Connect PowerKey to the computer
4. Plug the single end of the PowerKey ADB Cable (see note
1 in the diagram above) into the ADB port on PowerKey.
5. Plug the branching end of the PowerKey ADB Cable into
the ADB port on the back of your computer.
Connect the keyboard to the ADB Cable
6. Plug the keyboard cable into the branching connector on
the PowerKey ADB Cable (see note 2 in the diagram above). If you have other ADB devices, they should be connected in a “chain,” with one end of the chain joining to the branching connector.
The keyboard must be connected to the branching connector on the PowerKey ADB cable in order for PowerKey to work.
Install the PowerKey software
7. Install the software as described in Chapter 2, Software
Installation. You will not need to configure the hardware as
described in Hardware Configuration.
In addition, you can use PowerKey and PowerKey Pro on the same computer. See the next section for more information.
Page 86 Appendices
Appendix 2 Using Multiple PowerKeys
If you need more control over your system, you can use multiple PowerKey Pro units with a single computer.
Installing Multiple PowerKey Pros
PowerKey Pro units will be connected to your computer in a “chain.” The instructions below expand upon the steps de­scribed in Chapter 2. The “first” unit is the one connected directly to your computer’s ADB port.
Connect the power cords
Connect the power cords as described in Connecting the Power Cords. If your computer has Hard Power, it should be plugged
into the first unit.
Connect the ADB cables
Connect the first unit’s SCI Cable as described in Chapter 2, Connecting the ADB Cables. Plug the second unit’s SCI Cable to the branching connector of the first unit’s SCI Cable. Plug the keyboard cable into the branching connector of the second unit’s SCI Cable.
Connect the phone cables
Connect the phone cables as described in Connecting the ADB Cables. Connect the first unit’s phone cable between the Phone
Port of the first unit and the Line Port of the second unit. Connect the second unit’s phone cable between the Phone Port of the second unit and the modem.
Appendices Page 87
Installing PowerKey Pro and “Classic” PowerKey
PowerKey Pro also works along with the original PowerKey. To install, follow these steps:
1. Install your PowerKey Pro as described in Chapter 2. If
your computer has Hard Power, plug its power cord into your classic PowerKey.
2. Unplug the branching end of the PowerKey Pro’s SCI
cable from the ADB port on the back of the computer.
3. Plug the single end of the Classic PowerKey’s ADB cable
into the ADB port on the end of the PowerKey.
4. Plug the branching end of the Classic PowerKey’s ADB
cable into the ADB port on the back of your computer.
5. Plug the branching end of the PowerKey Pro’s SCI cable
into the branching connector of the PowerKey’s ADB cable.
6. Plug the keyboard cable into the branching connector of
the PowerKey Pro’s SCI cable.
7. Configure the hardware as described in Chapter 2, Hard-
ware Configuration.
When finished, your ADB cable setup should look like the diagram on the next page.
Page 88 Appendices
Using PowerKey Software with Multiple PowerKeys
The PowerKey Editor application will open a Schedule win­dow for each PowerKey unit connected to your computer. To set the Hardware Configuration options for each unit, bring that unit’s Schedule window to the front before selecting “Hardware Setup...” from the Edit menu.
You can create Events that affect more than one unit. Copy the Event from one Schedule window to another, and change the Actions appropriately for each unit. Since the Triggers for the two Events are identical, they will activate simultaneously.
You cannot cut and paste or export and import Events between different models of PowerKey. If you wish to create Events that affect a PowerKey Pro and a “classic” PowerKey, you will have to create matching Events manually.
Appendices Page 89
Appendix 3 Restarting Crashed Servers
No computer system is perfect, and crashes are an unfortunate fact of life. But when a computer is used unattended, serving files, web pages or in an interactive kiosk, a crash can be far more than simply annoying. It can mean long downtimes or late-night trips back to the office.
PowerKey Pro Model 600 offers a variety of features which can help you keep your server up and running. Our Server Restart Option (which is also available at an extra cost for Model 200) is included with Model 600. This package includes the When System Crashes and When Timer Expires Triggers, the System Running Qualifier, and the Add to Log Action. See Chapter 4, Reference, for more information on these features.
The best way to ensure that your system stays up and running is to attack the problem from several fronts. This appendix describes several example Events that you can mix, match and modify to form a coordinated restart strategy.
Automatic Restarts
Crash Restart
One of the most powerful uses of PowerKey Pro is also the simplest. This Event uses a When System Crashes Trigger and a Restart Action to restart the computer when it crashes.
This Event will cover most situations where the system comes to a complete halt.
If your server does not run 24 hours a day, you can add a Time Range Qualifier to this Event.
Page 90 Appendices
Soft Crashes
Sometimes an application will crash, leaving other applica­tions running. Since the PowerKey software is still running, the crash will not be detected. Apple’s “Macsbug” debugger can freeze the system enough so that these crashes will be detected by PowerKey Pro.
To use this ability, simply install Macsbug. No special configu­ration is necessary. Macsbug can be obtained on Apple’s web site at <http://info.apple.com/>.
Restarting after a Power Failure
To automatically start up your computer after a power failure, create an Event with a When Power Returns Trigger and a Start Up Computer Action.
PowerKey Pro will sense when power returns and automati­cally start up your computer.
Telephone Control
Restarting with a Phone Call
There may be times when the system isn’t completely crashed, but you need to “manually” restart it remotely. If you have a phone line connected to PowerKey Pro, this Event lets you restart the computer with a phone call.
Be sure to set the number of rings high, to keep wrong num­bers from inadvertently restarting your computer.
Appendices Page 91
PowerKey Pro also works with the “distinctive ringing” phone service, which can allow you to use the same phone line for remote access and remote restarts. See Chapter 4, System Triggers, for more information.
Security Issues
You can use the phone tone detection features of PowerKey Pro Model 600 to restart only if you enter the correct control code. To do this, you create two Events instead of the one described above.
The first Event answers the phone when it rings a desired number of times.
The second Event restarts the computer if the correct control code is entered on the telephone keypad.
If a wrong number causes the first Event to answer the phone, PowerKey Pro will automatically hang up if it doesn’t hear a recognized control code within 25 seconds.
Controlling Other Outlets
You can also use the Phone Tones Heard Trigger to turn other outlets on and off, in conjunction with the Switch Outlets Action.
Page 92 Appendices
You can also use this Trigger to create Events that do anything PowerKey Pro can do. You can call in to open applications or run AppleScripts to do any task you can imagine!
Other Features
Dealing with File Sharing
If a user is connected to your computer with File Sharing when an Event is attempting to shut down or restart it, this dialog box will appear:
This dialog box will interrupt the shut down process, and utilities like Okey Dokey can’t automatically dismiss it.
You can solve this problem by creating an AppleScript to turn off File Sharing, and running it from your Events before shutting down or restarting.
The “Stop File Sharing” AppleScript included with the system software will not work for this, since it displays its own dialog box when it runs.
To use this AppleScript, save it in the Script Editor as a “com­piled script.” Edit any Events that shut down or restart the computer, and place an Execute Script Action before the Shut Down Computer or Restart Actions. It may also be a good idea to place a Wait Action in the middle, to make sure that the script is finished before attempting to shut down or restart.
Appendices Page 93
Monitoring Custom Applications
Custom applications, such as databases or interactive presen­tations, can “ping” the PowerKey software in much the same way that the PowerKey software pings the hardware. You can use the When Timer Expires Trigger to restart the system when your application crashes or otherwise fails to respond.
You must design your application to periodically send an Apple Event to the PowerKey software, telling it to set the User Timer to, for example, 300 seconds. When your applica­tion stops resetting the User Timer, it will continue counting down. If the User Timer reaches zero, this Event will restart the system. See Appendix 5, Using AppleScript, for more informa­tion.
Page 94 Appendices
Appendix 4 Default Schedules
Sometimes a system administrator must set up multiple computers with a single “canned” system. Importing Sched­ules on each computer in these instances is impractical, and since the PowerKey software manages schedules by serial numbers, simply copying preference files will not work.
To solve this problem, the PowerKey software will look for and recognize a “default” Schedule file when it first runs on a computer. It will copy the Events and Hardware Setup infor­mation from this file when it sets up the Schedule for the connected unit.
Creating a Default Schedule File
1. Install PowerKey Pro normally on one Mac.
2. Set the Hardware Setup options for the systems you plan to use with your default Schedule file.
3. Create (or import) the Events you wish to include in the default Schedule file.
4. Quit the PowerKey Editor and open the PowerKey Folder in your system’s Preferences folder.
5. Locate the Schedule file. This file will be named “Schedule_xxx”, where xxx varies depending on the model of PowerKey installed. For PowerKey Pro, this file’s name will end with the serial number of your unit.
6. Duplicate this file, and rename it either:
“PowerKey Classic Default”, “PowerKey Pro 200 Default”, or
“PowerKey Pro 600 Default” depending on the model of PowerKey you created the default Schedule with.
Appendices Page 95
Using a Default Schedule File
To set up a “canned” system folder with the PowerKey soft­ware, follow these steps:
1. Place the PowerKey Extension in the Extensions folder of your system.
2. If you wish to allow editing of your Schedule, place the PowerKey Editor in the Apple Menu Items folder.
3. Create a folder entitled “PowerKey Folder” in the Prefer­ences folder.
4. Place your default Schedule file in the PowerKey Folder.
If you’re not sure which model of PowerKey will be connected to a computer using your canned system, you can place a default Sched­ule file for each model in the PowerKey Folder. The PowerKey Extension will automatically copy the default Schedule for the model it finds connected to the computer.
Page 96 Appendices
Appendix 5 Using AppleScript
AppleScript offers Mac users a powerful way to automate tasks and share information. PowerKey Pro extends the power of AppleScript in two important ways. You can schedule scripts with PowerKey Events, and you can even control PowerKey Pro itself with scripts.
The “Extras” folder on the PowerKey Pro master disk contains several useful examples showing how to use AppleScript with PowerKey Pro.
In addition to AppleScript, PowerKey Pro works with any OSA­compliant scripting language, such as UserLand Frontier.
Running AppleScripts in Events
The PowerKey software allows you to run a script in any Event. You can use this ability to run scripts on a time sched­ule, or in response to system activity (for example, when the phone rings or you type a keystroke).
To use a script, save it as a “compiled script” in the Script Editor. You may find it handy to place scripts in the PowerKey Folder (in your Preferences folder), but they can be placed anywhere on your hard disk. To run the script, create an Execute Script Action in the desired Event(s).
If your script opens a dialog box to display or request information, you will not be able to run it as a compiled script. This is because the PowerKey Extension runs as a background-only application, which cannot draw windows. To run such a script, save it as an “applica­tion” in the Script Editor, and run it with the Open File Action.
Appendices Page 97
Controlling PowerKey Pro with AppleScript
In addition to running scripts from the PowerKey software, you can control PowerKey Pro directly from scripts. To control PowerKey, place a tell block in your script as follows:
You can then place PowerKey scripting commands inside this block.
The PowerKey software defines several classes of objects for use by AppleScripts. A unit is a single PowerKey Pro, which contains several outlets and events. Units and outlets may be specified by name or number, but events should be specified only by name. You must specify a unit even if you only have one PowerKey Pro connected to your computer.
For more information on PowerKey classes, use the “Open Dictionary” command in the Script Editor’s File menu, and open the PowerKey Extension (not Editor) in your system’s Extensions folder.
Setting Outlets
To set an outlet’s state, you set the level property of a unit’s outlet to 0 (for off) or 100 (for on).
You must specify both the outlet and the unit, even if you only have one PowerKey Pro. You can refer to outlets and units by number or name.
Page 98 Appendices
Reading Current Outlet States
To find out if an outlet is on or off, you can get the level property of a unit’s outlet.
The result variable will contain 0 (if the outlet is off) or 100 (if the outlet is on).
Suspending and Resuming Events
You can suspend and resume Events by setting the enabled property of a unit’s event to true or false.
You can also check to see if an Event is suspended by getting the property.
Executing Events
You can execute an Event immediately in a script. The Trigger and Qualifiers are ignored, and all Actions are performed in sequence.
Setting the User Timer
The PowerKey software also defines a user timer. You can set this timer with a number of seconds, and the software will immediately begin counting down.
When the user timer reaches zero, any Events with a When Timer Expires Trigger will execute.
Appendices Page 99
This feature was designed for use by custom software such as databases or interactive presentations. The software can periodically “ping” the PowerKey software by setting the user timer. If the software crashes or fails, an Event can restart the computer.
If you wish to use this feature, but are not running AppleScript, you can send a simple Apple Event to the PowerKey software. This Apple Event should have an Event Class of ‘PKPr’ and an Event ID of ‘Tick’.
Page 100 Appendices
Appendix 6 Troubleshooting
This section answers the most common questions that can arise during installation. Because PowerKey Pro is so flexible, we can’t address all the possible issues in this space. However, we have a technical support database online. If you don’t find a solution here, you can find this database on our site on the World Wide Web, at <http://www.sophisticated.com/>. See Appendix 6, How to Reach Us, for more information.
PowerKey Pro won’t start up my system.
• Make sure your keyboard cable is correctly plugged into the short branching connector of the SCI cable, as de­scribed in Chapter 2, Connecting the ADB Cables.
• Make sure the SCI cable is correctly plugged into the computer and the PowerKey Pro unit, as described in Chapter 2, Connecting the ADB Cables.
• Make sure the equipment’s power switches are turned on.
After modifying my Schedule, pressing the “Power On” key won’t start up my system.
• PowerKey Pro has an emergency override feature. Press the “Power On” key slowly four times, waiting about a half-second between presses. Hold the key down on the last press. This “short-short-short-long” sequence will turn on the computer and all the outlets.
Once your computer has started up, check for “Power On” key Events that do not have “Start Up Computer” Actions, or that have Qualifiers that keep them from starting up the system at times.
Loading...