Hello,
Back in OS 7.5 I wrote a bunch of simple scripts that worked fine up through OS 9. Now that I have finally upgraded to OSX I have been debugging them. I am a little embarrased to admit that I cannot figure this out, but I my file opening script using path names no longer works. For example, this is to open a FileMaker file and I used the path as follows:
tell application "Finder"
activate
select file "banking" of folder "Banking" of folder "Finances" of folder "Primary Data" of folder "Genther" of folder "Users" of startup disk
open selection
end tell
Please let me know what I an doing wrong.
Thanks
Model: G4
Browser: Safari 312
Operating System: Mac OS X (10.3.9)
tell application "Finder"
activate
open file "banking" of folder "Banking" of folder "Finances" of folder "Primary Data" of folder "Genther" of folder "Users" of startup disk
end tell
.or this:
tell application "Finder"
activate
open "Macintosh HD:Users:Genther:Primary Data:Finances:Banking:banking"
end tell
I tried your script on my computer and it seems to work fine for opening the selected file. Are you sure that your path to the file is correct? You could insert code as such:
set fileChoice to choose file with prompt "Choose your file"
open fileChoice
You could also declare fileChoice as a property at the beginning of the script:
property fileChoice : {}
if fileChoice is {} then
set fileChoice to choose file with prompt "Choose your file."
end if
open fileChoice
This will keep the file you want to open (after you choose it the first time you run the app) as fileChoice and will always open that file. If you recompile the script however it will ask you to choose the file again.