"open file" problem on Mac OS 10.0

Hello,

I have a problem with “open file” command on Mac OS 10.0 only ,
but the command is working fine on other versions of Mac(9.1, 9.2, 10.1, 10.2 and 10.3)

The error message is "Can’t get file “Mac HD:My Path+:Install”.
There is a space and + in foler’s name. Can it be an issue?

Below is the script.

set me_ to path to me
tell application “Finder”
set appContainer to container of me_ as text
set appInstall to (appContainer & “My Path+:Install”)
open file appInstall
end tell

Thanks in advance.

Hi,

Try changing:

set appInstall to (appContainer & “My Path+:Install”)
open file appInstall

to:

set appInstall to (appContainer & “My Path+:Install”) as alias
open appInstall

I don’t have 10.0 to test.

gl,

Thanks Kel,

I really appreciate your reply.

By the way, Can you explain the difference?
I am a bigginer of AppleScript.

I tried ‘open file "Mac HD:My Path+:Install’,
the error was same(Can’t get file "Mac HD:My Path+:Install).

Thanks again.

Hi,

Did it work? I was thinking that OS 10.0 was new and also had a new version of AppleScript, Finder, etc… So I looked here:

http://www.applescriptsourcebook.com/applescript/applescript160.html

Checking for bugs when scripting Finder, found this:

Apple’s Chris Nebel confirmed that "the Finder in Mac OS X 10.0 doesn’t understand “file ” references. However, “alias” references and long-hand Finder object specifiers both work fine. 9/22/01

There is another advantage using alias references. When compiling, if it can’t find the item, then it will error. You can use this in both setting a reference and checking if the item is there with the use of error handlers (try dtatements).

I couldn’t find out if they fixed it in OS10.1, but I woulld assume that fixing such an important bug would be a priority.

gl,

Thanks again, Kel.

I do not have a Mac 10.0 as well, so can’t test it right now.
Someone who is using my script is claiming the error.

Cheers.

Hi Kel,

It did work.
I appreciate your help very very much…^-^

Cheers.

Great! I was wondering about this when I saw your other post.

gl,