script trying to open classic when not needed

try
	tell application "Finder"
		open file "BIB_5113:index.htm"
	end tell
on error
	beep
	display dialog "Oops: " & "Please Insert your course CD and try again. " buttons {"OK"} default button 1
end try

I have tried to write this simple script to open an index.htm file from a cd. I have created it, compiled and tested it within the Script Editor. However, when I save it as an application I get the following message when I run it:

Classic sannot find a Mac OS 9 system folder on the startup disk to use. You may need to install Mac OS 9.1 or later (classic support) on your computer…

This script is supposed to be an OS X only script that opens the index file in the users default browser.

When I save as an app there is not a check box related to OS 9 or Classic.

Please help, I am a complete noobie at a loss and on a deadline.

K

Model: G5 DP
AppleScript: 2.1.1
Browser: Safari 419.3
Operating System: Mac OS X (10.4)

I am not able to duplicate the problem on my computer, but I have two ideas:

  1. Double-click on that “index.htm” file manually to see if you get the same error. Maybe it is not an AppleScript thing but the file itself.

  2. Rather than tell the finder to open it, maybe it would be more reliable to directly tell Safari (or whatever your browser is) to open the file. That way, the finder isn’t deciding what app to use which in this case appears to be an OS9 app for some reason.

Model: G5 Tower (not Intel) - Script Editor ver 2.1.1
Browser: Safari 419.3
Operating System: Mac OS X (10.4)

Thanks for your help. I think that I may have stunbled on the answer. If I save it as an application bundle it seems to work. Now I just need to fix it so that it finds an invisible file.

K

Use System Events as the target application instead of the Finder.
System Events are capable to access invisible files

Thanks for all the help.

K