[ENH]Applescript Plugin
Andrew C. Greenberg
werdna at gate.net
Tue Sep 28 01:45:32 UTC 1999
Attached please find the most current version of the Applescript
Plugin. In the attached .sit file, please find:
Applescript1.27Sep905pm.cs
Applescript2.27Sep907pm.cs
TestOSAPlugin
To install:
(*) Unstuff the SIT file, place all the files in your Squeak directory
(1) Startup a fullly updated 2.6test Squeak
(2) fileIn Applescript1
(3) fileIn Applescript2
(5) Execute the following doIt:
Applescript initialize
You should be good to go.
Principal differences between this upgrade and the one released with
Squeak2.6test updates is a substantially more complete implementation
of the Applescript API and supporting routines, and full support for
Applescript contexts and script inheritance.
EXECUTION/COMPILATION OF SCRIPTS:
To run a script:
Applescript doIt: 'beep 3'
To compile and save a script (with its context) in a variable:
var _ Applescript on: 'beep 3'
To execute the compiled script in the null context:
var doIt
SCRIPT CONTEXTS:
The following sequence:
var _ Applescript
on: '
property beepCount:0
set beepCount to beepCount + 1
beep beepCount'
Will beep an additional time with each repetition of:
var doIt
You can maintain independent contexts by compiling the mainline
script mode:0, and passing the context as a parameter:
var _ Applescript
on: ' global beepCount
set beepCount to beepCount + 1
beep beepCount'
mode: 0
context _ Applescript on: 'property beepCount'
And you can share the context across scripts, for example, with:
reset _ Applescript
on: ' global beepCount
set beepcount to 0'
mode: 0
so that executing the following doIt:
reset doItIn: context
resets the beepCount counter.
Other relevant commands:
Applescript do: aString in: aContext mode: anInteger
Applescript on: aString mode: anInteger
scriptInstance doItMode: anInteger
scriptInstance doItWith: aContext mode: anInteger
Attachment converted: Anon:Applescript1.27Sep905pm.cs (TEXT/MSIE) (00013B9B)
Attachment converted: Anon:Applescript2.27Sep907pm.cs (TEXT/R*ch) (00013B9C)
Attachment converted: Anon:TestOSAPlugin (shlb/????) (00013B9D)
More information about the Squeak-dev
mailing list
|