Opening TextEdit with a document
Opening TextEdit with a document
- Subject: Opening TextEdit with a document
- From: Craig Hoyt <email@hidden>
- Date: Sun, 15 Feb 2004 14:48:26 -0800
Hi All,
I very new at this so bear with my simplistic question. I'm developing an
application and in it I allow a TEXT document to be opened in TextEdit
using an AppleScript. This is my Script:
with timeout of 5 seconds
tell application "TextEdit"
activate
open filePath
end tell
end timeout
filePath is a string containing the complete file path surrounded by
quotes. TextEdit is launched with a new untitled document and sent to
frontmost app but my document file is not opened. If the TextEdit app is
already running no document is opened and TextEdit is not sent forward. I
suspect the problem is in my filePath var but not sure what I doing here.
My application is a Carbon application and runs in OSX and Classic
environments. My script for the Classic environment is much more verbose
but opens SimpleText and my document file as I want. In OSX the above
script fails to open the document file.
Thanks for any help someone might provide in solving this issue.
Craig
_______________________________________________
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.