Unable to open file from AppleScript

Hi All, I am having a problem on one of two computers when I try to open a file from an AppleScript. On my development computer (Mac G5, Panther) I have no problem running any AppleScript that opens a file. On my database server (Mac G4, Panther)I cannot open ANY file from ANY application using AppleScript.

I have set up a simple script as follows and only changed the hard drive name for each computer.

The script below works fine on the development computer:

tell application “TextEdit”
activate
open file “160GB ATA HD:Apple Script Test.rtf”
end tell

the script below does not work on the database server (has two hard drives). I get a error, TextEdit open failed!

tell application “TextEdit”
activate
open file “Database HD:Apple Script Test.rtf”
end tell

I am a neophyte when it comes to AppleScript, any assistance would be much appreciated.

:rolleyes:

Are you sure the disk name is wrong?

The script is so simple there’s very little that can fail other than an invalid file name. For example, is there a trailing space on the end of the disk name?

Morning Camelot, we’ll you “hit the nail on the head” so to speak. I went back and checked the hard drive name “Database HD” and low and behold it had a leading blank " Database HD". Many thanks for pointing this out and enabling me to regain my sanity!!..