SmileandScriptEditor.htmlTEXTVIZF߰߰Ks Smile and Apples Script Editor

Smile and Apples Script Editor

Many users new to Smile have had some experience with Apple's Script Editor. This section is intended to give those users an introduction to Smile by relating it to the Script Editor. It establishes a starting point from which you can advance.

Requirements

There are versions of Script Editor for 680x0 processors. Smile is PPC native. Thus, Smile can run only on PPC machines.

User Interface

- "Stop" control
The Script Editor includes a 'Stop' function in the form of a button in its script window and a menu item with a shortcut key. In Smile there is no 'Stop' in the menu, you must use the shortcut (  .) to halt the execution of a script.

- The script window of Script Editor has four buttons "Record", "Stop", "Run" and "Check Syntax".
The script window of Smile has mini-buttons, grouped in the bottom bar for "Run" and "Check syntax".
Moreover, the bottom bar provides a "Handlers" pop-up menu.
Note: the 'AppleScript' menu of the windows of Script Editor is displayed in Smile if you check 'Use available scripting components' in the Preferences dialog.

-"AppleScript Formatting..." ("Edit" menu of Script Editor) provides for changing the display format of compiled scripts.
Setting up custom AppleScript formats in Smile is done through the Preferences Dialog .

Result window(s)

Script Editor provides for opening a "Result" window through menu selection or shortcut key.
Smile automatically opens a result window named Worksheet to display the result after a script has run.
Moreover, the result of running a script in Smile can easily be directed to other Smile windows, also known as "output" windows .
The "Result" window of Script Editor erases its contents each time a new result is produced. Moreover it cannot display results bigger than 32 kb. The result windows of Smile accumulate results that can be saved to disk in arbitrarily large text files.

Smile has, Script Editor has not

Find and Replace
This basic functions work in scripts, and also in dictionaries. They are available through the "Find" dialog.
Find definition
This function retrieves the definition of the selected word in the dictionaries.
Script menu
The built-in " Scripts" menu of Smile provides a way to make a script launchable by menu.
Word selecting
The keyboard shortcuts and the mouse tricks familiar to the Mac user for conveniently selecting text are available with Smile.
Drag and drop
You can drag and drop text inside a Smile window or from one window to another. You can drop a script file onto a script window to display its contents.
Scripts longer than 32 kbytes
The only limit is the memory allocated to Smile.
"Handlers" pop-up menu
This menu of the script window lists the handlers and lets you jump to any of them. Smile provides for setting "marks" in this pop-up menu.
"Compare"
Use this command, available in the "Edit" menu, to check the differences between two files.

Beyond basics ...

In addition to script windows, Smile includes what are called "text windows".
Smile text windows offer a favorable environment for editing and debugging scripts, since you can run scripts in text windows .

Unlike the Script Editor, Smile is scriptable, recordable, attachable, and factored (internally scripted). The great majority of the Smile functions are controlled by scripts that are accessible to the user.


 _R> Experts and developers may want to customize the interface of Smile. See Custom interfaces for a description of the various possibilities.

Sample scripts

Some help files contain sam {    k  9  k   k    k#  3  kC    k    k#  7  k;    k    k#  M  kU    k          c  kg    k  9  q        k    k    k  d          k    k    k          &  k *       k   k /  S  k f  {  k   k    k   k  k r   k      !  k (  ;  k C   k   k    k    k    k    k  &  U  f  j    k    k  W  k    k    k            k    k    k  selelist long^long^pbndlist8longlong+longlongBDrwfalspvistrueWIDLfalsICFFlongrSiDlongptxfTEXTGenevaptpslong Rectlist8longlonglonglongWTBHlongRqULlongLWdtlongBrWdlongAuAdfalsTbSzlong scptscptVFasdUAS 1.101.10  misccura"  CONT  misccura  cwtx-  kfrmID ascr ޭ _hH=TZstylSOUP&reco2 icwtx