ocbanner picture

oneclick_tiny picture

Guide to
OneClick

What is OneClick?
A good introduction to OneClick.

What Are Floating Palettes?
If you aren't sure what floating palettes are or why they're cool, read this section.

OneClick's Standard Palettes
OneClick ships with several palettes that will quickly become indispensable.

How Does it Work?
OneClick isn't magic -- though it may seem like it.

What Can I Do With OneClick?
Here are a few of the things I do with OneClick. The limits are your imagination.

Working With OneClick
OneClick makes modifying buttons and palettes easy!

Don't Be Shy!
Thinking 'programming' sounds scary? Don't be. Scripting OneClick is easy!

Is It Perfect?
No program is perfect. Here are a few of the glitches, bugs, and problems with OneClick. None are insurmountable, but you should be aware of them.

How Does it Work?
OneClick is billed as a macro program -- software that can memorize a sequence of actions and repeat them for you. Do you ever find yourself doing the same task over and over again? For example, the other day I had a whole folder of images that were TIFF and I needed to convert them to JPEG. I could do them manually, one by one. But wouldn't it be great if the computer could watch what I'm doing and repeat it?

That's where macro software is a lifesaver. You turn on "record" mode, do the task once, and the computer memorizes your sequences of mouse moves and clicks, key presses, etc. Play back the macro and those moves are duplicated exactly like you did them.

But many times macro software isn't enough. In fact, most of the time it isn't. Human tasks are rarely so generic that a non-thinking machine can just take over. Most of the time a repetitive task involves thinking -- making decisions based upon the current status of things.

For example, let's say I've got a folder full of JPEG files but my PC-using colleague needs them all named ".JPG" for his system. Now I could manually go through all those files and rename them, one by one. But that's tedious. That's exactly what the computer was meant to avoid.

Using plain old macro software I'm limited. I can memorize selecting a file and changing the name, but how do I tell the computer only to select JPEG files? With macro software there isn't any way -- the macro would work on all files in a folder, not just the JPEG files.

OneClick to the rescue. Because OneClick is more than a simple macro player, it can actually analyze my files and rename them appropriately. That's right, using a simple OneClick script, I can tell it to find all JPEG files and rename them to ".JPG"! That's power.

How does OneClick do something like that? Well, it's not magic. It takes programming. Yeah, OneClick has its own programming language called Easy Script. But unlike most 90's products, it really lives up to its name.

Scripts in Buttons
Every OneClick function is a script that's stored inside a button. To run the script, you click on the button. Let's take a look at a simple example. Back in What Are Floating Palettes? I showed the standard ClarisWorks palette:

cwpalette picture

Let's open up the "Print" button (the fifth from the left). Here's what it looks like in the Script Editor:

ocedit_simple picture

Scripts are just a series of commands. These commands aren't difficult, but it does take time to learn them. You can't expect to master the full scripting power of OneClick overnight. (See Don't Be Shy! for more on scripting.)

Briefly, the above script checks to see if the "Print" menu command is available, and if so, it selects it. If it's not available, it beeps and ends. That's it. Pretty simple!

This script is actually more complicated than it needs to be. Really the whole thing could be done with one line:

SelectMenu "File", "Print..."

In fact, if you clicked on the little "record" button in the above Script Editor and then chose the "Print" command from the "File" menu, it would generate the above short script! The only problem is that if the print command isn't available for some reason (such as there being no document open), nothing will happen. There won't even a be a beep sound to let the user know something didn't work. So technically both scripts function the same -- it's just that the longer one is a bit more sophisticated.

Just about any sequence of mouse clicks, menu choices, key presses, etc. can be recorded by the OneClick Script Editor. Anything you do turns into a script -- albeit a simple, linear one. The recording feature is great for simple shortcut buttons that choose an item from a menu, for instance, but more sophisticated scripts require you to learn a little programming.

A good example is the "New" button in the ClarisWorks' palette. Because ClarisWorks is an integrated program that supports different kinds of documents, it normally present you with a dialog of document types when you choose "new" from the file menu. The OneClick button, however, presents you with a popup menu of document types allowing you to bypass the dialog! Much faster and more convenient.

ocedit_complex picture

This is script is obviously a little more involved than the previous one, but it's not that complicated. The "PopupMenu" command presents a menu of document types (listed between the quotes). The choice -- once the user makes it -- is stored into the variable 'a'. The "if" statement examines the variable 'a' to see which document type the user chose. That choice is eventually passed to the application via an AppleEvent (that's the Process.SendAE command). Something like this could never be recorded, but it's not hard to program. No other scripting environment gives you this much power so simply!

Assigning a Shortcut Key
OneClick gives you the power to assign a keyboard shortcut to any OneClick button. The keystroke can even override an application's default command -- great for when developers change the shortcut keys to your favorite program. (I still use PageMaker's original "Command-W" for "Fit-to-Window" in all my favorite page layout and drawing software.)

To change or set a shortcut, you edit the button with the OneClick Button Editor. Click in the field labeled "key" and type the combination you want: it can be any combination of Command, Shift, Option, and Control keys. Here I've edited the "Empty Trash" button (part of the Finder Palette) and given it the convenient shortcut Command-T.

mt_trash picture

Now to empty the trash (if it's full), I just press Command-T. Swoosh! It's gone! If only taking out the real trash was so easy!

Previous | Next

azwebsite picture Updated on Sat, Oct 2, 1999 at 9:57:33 AM.
Contents Copyright ©1999 by . OneClick is made by WestCode Software and is not affliated with Marc or DesignWrite.