Re: OS X: Coercing Finder's Item Reference into String
Re: OS X: Coercing Finder's Item Reference into String
- Subject: Re: OS X: Coercing Finder's Item Reference into String
- From: cris <email@hidden>
- Date: Sun, 19 May 2002 16:34:52 +0200
on 5/14/02 2:32 AM, xxx at xxx wrote:
>
> I want open via script the Finder's selection using Script Debugger as
>
> application.
>
> 'open <selection> using <app>' seems to need a string as path to the
>
> selection. The Finder gives me only a reference and I cannot coerce it into a
>
> string. This is what I have tried so far:
>
>
>
>
>
> tell application "Finder"
>
> set TheAppRef to (application file id "asDB" as string)
>
> selection
>
> set TheSelection to (item 1 of result) -- 'selection' does not work in this
>
> line
>
>
>
> --POSIX path of TheSelection
>
>
>
> --TheSelection as record
>
> --set TheSelection to item 4 of result
>
>
>
> --TheSelection as alias
>
>
>
> --path to TheSelection
>
>
>
> open TheSelection using TheAppRef
>
> end tell
>
>
>
>
>
>
>
> Any ideas?
>
>
>
Is this what you mean Cris?
>
>
tell application "Finder" to set foo to selection
>
set bar to item 1 of foo as string
Interesting thing! A bug in the category "don't put it in separate lines".
Until now I knew only the opposite case (commands not working when formed in
one line...).
Thanks & greetings
cris :-)
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.