Why is the Finder not recordable?
Why is the Finder not recordable?
- Subject: Why is the Finder not recordable?
- From: email@hidden
- Date: Thu, 23 Jun 2005 12:07:05 +1000
Look, I don't want to jump on a bandwagon, but as
a moderately naive user I went to www.apple.com,
clicked on support and entered Applescript manual
and hit return
The first entry that comes up is headed
"Applescript manuals" and the link
http://docs.info.apple.com/article.html?artnum=50096
gives me three docs.
The Applescript Finder Guide (seemed like a good
place to start...) there is ©1994 and there is no
other indication of its currency. it's at
http://download.info.apple.com/Apple_Support_Area/Manuals/servers/AppleScriptFinderGuide.PDF
The Introduction starts
"Finder scripting refers to the use of
AppleScript and an application such as the
Script Editor to write, record, or run scripts
that trigger actions in the Finder.
This chapter introduces Finder scripting. It also describes how to
? record your actions in the Finder in the form of a script
..."
The First item is
"What Is Finder Scripting? "
The second and third para s contain the meat (and exactly what I wanted to do!)
"The Finder is both scriptable and recordable. A
scriptable application is one that
can respond to commands sent to it when another application, such as the Script
Editor, runs a script. A recordable application
is one that uses Apple events to
report user actions for recording purposes. When recording is turned on, the
Script Editor creates statements corresponding to any significant actions you
perform in recordable applications, including
actions you perform in the Finder.
By recording or writing scripts that control the Finder, you can automate many
file management and networking tasks that you would otherwise have to
perform manually.
For example, the script that follows copies the items from a folder on the
startup disk to a folder on a different disk.
Instead of opening all the folders
by double-clicking them then dragging the contents of the AppleScript
folder to a storage disk, you can run the script."
Needless to say this doesn't work in OS X (this
is where I started) and in my view it should.
What's more if it could be done in 1994, why can't it be done now?
All i wanted to do was achieve a simple outcome,
a simple native Finder action (copying a file).
And while we're at it, if I drag and drop a file
into Script Editor the full filepath appears in
the POSIX version but it doesn't correctly escape
the spaces in the file/folder name(s). Given that
Applescript promptly objects when I try and
compile, why can't Script Editor put the "right"
path in place (ie substitute : for /) since it
obviously knows that what is there is "wrong"?
It would also be more helpful if the Script
Editor "Help" function pointed to the "right"
documentation, or included at least a basic
subset. I searched my Hard Drive for posix (using
Spotlight) and came up with a few docs which had
nothing to do with Applescript.
Cheers, Andrew Pavey
At 11:40 AM -0700 22/6/05, Christopher Nebel wrote:
On Jun 21, 2005, at 7:28 PM, email@hidden wrote:
At 1:06 AM +0100 18/6/05, has wrote:
If you'd read the AppleScript documentation...
Helpful advice, but I've just spent an hour
searching Apple's support website for
Applescript manuals.
Short answer:
See
<http://www.apple.com/macosx/features/applescript/resources.html>,
in particular the link to the AppleScript
Language Guide
<http://developer.apple.com/techpubs/macosx/Carbon/interapplicationcomm/AppleScript/AppleScriptLangGuide/index.html>.
I'm always perplexed by people who say they
can't find anything about AppleScript,
documentation or otherwise, on Apple's site, but
then I've been doing this for a while and know
how to stroke search engines the right way.
What were you attempting to do? Seems pretty
straightforward to me -- search for
"AppleScript" from www.apple.com, and the first
hit will be the dedicated AppleScript page,
which has a box labeled "Resources: links to
documentation, instructional materials, tools,
training, and third-party websites."
Bear in mind that AppleScript is regarded as a
developer tool, not a user tool, so most of the
technical documentation is actually on the
developer site. For example, searching for
"AppleScript escape character" from
www.apple.com doesn't yield much, but if you
click the "search in developer site"
(developer.apple.com), you'll get a bunch.
Also, a handy Google tip (which also works from
the Safari search bar): you can limit the
results to a particular domain by adding
"site:foobar.com". For instance, searching for
"applescript escape string literal" nets about
500 results; adding "site:developer.apple.com"
nets three, the first of which has most of the
answer right in the abstract.
--Chris Nebel
AppleScript and Automator Engineering
--
Spelean is the exclusive Australian and New Zealand Distributor
for many fine camping, climbing, caving and rescue products
Web pages: http://www.spelean.com.au email: email@hidden
Phone: (+61) 2 9966 9800, Fax: (+61) 2 9966 9811
PO Box 645, ARTARMON, NSW, 1570, Australia.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden