Re: Can't tell an application to open
Re: Can't tell an application to open
- Subject: Re: Can't tell an application to open
- From: Dave <email@hidden>
- Date: Sun, 20 Feb 2011 19:47:44 -0600
I've already posted my bypass code with the failing statement commented out.
Here is the original code which works perfectly in a normal AppleScript:
property DebugLogName : "HotLog Log" -- log file name
property DebugLogPath : "/tmp/" & DebugLogName -- path to use
set theFile to POSIX file DebugLogPath
tell application "TextWrangler"
try
(* FOLLOWING LINE FAILS IN ASOC but works fine in an ordinary script.
The open always goes to the script which can't handle it *)
set textDocument to open theFile -- matches already opened file window if any
on error
-- file does not exist
do shell script "touch " & quoted form of theFile
set textDocument to open theFile -- returns document for the new file
end try
What is the "proper" ASOC way to code the above? As I see it the immediate problem is not being able to pass the open command to TextWrangler.
Thanks in advance,
dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden