Jaques Law Office

Introduction to OneClick

© 1997 Kevin Jaques. All rights reserved excepting that this file may be copied for non-commercial purposes, unchanged. No warranties apply. I am just a user volunteering my observations and collecting those of others.

Table of Contents

This Article was delivered by:
This Article was prepared for:

My Struggles (With Macros)

No Command Line - - No Macros

OneClick

Powers

Interface

The Approach

Scripting

Editing

  • There's good news and bad. They are both that the OneClick Editor, which contains the script editor, comes up instantly, as a dialog box belonging to whatever application you are in.
  • That's sweet speed, especially if you are accustomed to QuicKeys.
  • Unfortunately, since it is not its own application, it doesn't have all the things one expects from an application. You can't drag and drop text. You can't script it. Truly, you shouldn't even expect copy and paste to work, except they do.
  • There's more good news and bad. It is just a text editor. That's bad since users love to be guided through the building of a script, and to see meaningful icons and structure, as some of the graphical programming environments offer. It's good because you can copy and share scripts like crazy.
  • The bad is greatly eased, since the popup Parameters tool offers users just that sort of graphic guiding. For instance, if you wish to designate an icon, you use the Icon item of the Parameters menu, and are given a choice of the available icons, graphically presented.

Online Help

  • However, from the basic text editor, you have instant access to the online help. Again, I mean instant.
  • There is a pull down menu to restrict the items shown to things like commands, properties, window related, text related, etc. When you see the item you like, you double click it, and get a clear explanation with examples which can be copied directly to your script.
  • It's great. But it doesn't offer help for any buttons you have created, or for other available scripting resources, like Applescript.
  • Also, it's weird. If you haven't actually chosen a button, it won't copy.

Object Oriented

  • If you are accustomed to the concept, it is great. You learn names for some basic 'methods' then apply them to various objects. You use the object name, a period, then the method. So Button.new, file.new, menu.new, etc., do comparable things.
  • The Objects are:
    • button
    • dialog button
    • file
    • menu
    • palette
    • process
    • screen
    • volume
    • window
  • Still, I maintain that humans are verb-oriented, especially to us english speaking types, who find object oriented utterances and paths like file(startup:documents:calendars:mine).open to be awkward.
  • But hey, Object Oriented Programming Style (OOPS) has been all the rage for years now.

Properties

  • An object will have properties, which can be read or set. For instance, window.front can be read. It will be true if the window is front-most. Or it can be set. Or both. A typical toggle command would be window.front(not(window.front)).
  • Note that buttons are objects and scripts are properties, so OneClick is capable of reprogramming itself on the fly.

Activation Events

  • If you used Hypercard, you will find it familiar. Each button contains a script. The script may contain more than one Handlers. Each Handler will handle one of the following types of 'event':
    • DragAndDrop
    • DrawButton
    • MouseDown
    • MouseUp
    • Scheduled
    • Startup
  • Plainly, there is the capability for scheduling scripts, either on startup, or at regular intervals.
  • The following is WestCode's explanation of 'Scheduled'
    • Use the Schedule command to turn on scheduling for a script. (If you want scheduling to run all the time, put the Schedule command in the script's Startup handler.) You can specify how often the Scheduled handler should run in increments of 1/10th of a second. Scheduled scripts run only when the Macintosh is idle (waiting for keyboard or mouse input).
    • Normally, a Scheduled handler runs only when its palette is visible; the scheduling stops if the palette is hidden, then resumes when the palette is made visible again. To have a Scheduled handler run even if its palette is hidden, include 1 (True) in the Schedule command's optional run-always parameter.
    • Examples
    • // Play the Quack sound every five seconds from the time the application starts up.
    • On Startup
    • Schedule 50
    • End Startup
    •  
    • On Scheduled
    • Sound "Quack"
    • End Scheduled

Support

Stability

Overall Review

Where Are They Now?

Sorry, that's all the time I have.


This Jaques Law Bits was delivered by:

Kevin Jaques, B.A. LL.B.
of the

Jaques Law Office

#101 - 2515 Victoria Avenue

Tel: (306) 359-3041

Regina, Saskatchewan

Fax: (306) 525-4173

Canada, S4P 0T2

Home: (306) 586-2234

email: jaques.law@dlcwest.com
Remember, like any other form of communication, email may be intercepted.

Please visit our Web Site

Homepage

Education

Experience

Personal

Biography

Affiliations

Retain

Our Favourite Links


This Jaques Law Bits was prepared for:

The MacIntosh User's Group of Regina Saskatchewan

Text Based Page
Fancy Page