• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can't tell an application to open
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Can't tell an application to open
      • From: Shane Stanley <email@hidden>
References: 
 >Re: Can't tell an application to open (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Trouble with preferences (using "ApplescriptObjC Explored")
  • Next by Date: Re: Trouble with preferences (using "ApplescriptObjC Explored")
  • Previous by thread: Re: Can't tell an application to open
  • Next by thread: Re: Can't tell an application to open
  • Index(es):
    • Date
    • Thread