OT: Applescript help

jmck at mac.com jmck at mac.com
Fri Aug 27 11:07:24 PDT 2004


Apologies for the OT, but I believe that somebody on this list probably 
knows the answer to this one...

I have a situation where I need to help other users who have a list of 
POSIX path references, in a non-services aware application. I want them 
to be able to quickly reveal the original files in the Finder, without 
making use of anything other than an Applescript droplet... so no fair 
copying the list into OO!

I am encountering the wacky world of mac paths and POSIX paths in 
Applescript...

Here's the gobledygook I have cobbled together by peering into the AS: 
The Definitive Guide book. I want them to be able to copy the POSIX 
path and click on an Applescript to reveal the original file.

tell application "Finder"
	activate
	set thePath to the clipboard
	set pf to POSIX file thePath
	set colonPath to pf as string
	reveal file colonPath
end tell

The above returns an error, "Finder got an error: Can't get POSIX file 
"insert proper POSIX path here".

Any help appreciated.

John McKenzie


More information about the OmniOutliner-Users mailing list