Re: Stumped with open file
Re: Stumped with open file
- Subject: Re: Stumped with open file
- From: Rob Stott <email@hidden>
- Date: Wed, 20 Mar 2002 18:32:48 +0000
Hi there,
Not sure what9s causing the problem, but if the file is always in the same
file as the script then this should work (providing you save the script as
an application). There9s probably a much more elegant solution but at least
this works.
Good luck
R.
tell application "Finder"
try
set thePath to path to me as text
set theCount to the count of the characters of thePath
set thePath to ((characters 1 thru (theCount - 11) of thePath) as
text) & "CS_User_Tutorial.pdf"
open file thePath
on error
set thePath to choose file with prompt "Couldn't find file
'CS_User_Tutorial.pdf', please locate it"
end try
open file thePath
end tell
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.