On Nov 7, 2008, at 6:52 PM, emailboy wrote:

> I have a very simple script that is trying to open a file in BBEdit
> read only, but when run, it tells "Finder" instead of "BBEdit" to open
> the file:
>
> tell application "Finder"
>       set alias2 to file "blah-blah-blah"
> end tell

Calling the variable "alias2" doesn't change its type. If you look at  
the contents of alias2 at this point in your script, it is actually a  
specifier for a Finder object.

Later, `open alias` will create an open event targeted at the  
specifier, which is a Finder object.

(Yes, it is surprising, but that's just the way AppleScript works.  
This is out of BBEdit's hands.)

So if you instead write

tell application "Finder"
        set alias2 to file "blah-blah-blah" as alias
end tell

the script will do what you want.

Jim

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "BBEdit Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a specific feature request or would like to report a suspected (or 
confirmed) problem with the software, please email to "[EMAIL PROTECTED]" 
rather than posting to the group.
-~----------~----~----~----~------~----~------~--~---

Reply via email to