• 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: Open Bugs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Open Bugs


  • Subject: Re: Open Bugs
  • From: Luther Fuller <email@hidden>
  • Date: Thu, 19 Jan 2012 10:42:46 -0600

On Jan 18, 2012, at 2:56 PM, I wrote:

The command ...

tell application "TextEdit" to open fileAlias

if it cannot open the file, perhaps because of permissions, should return an error (number and description) to the script. It does not report an error to the script, but posts a dialog to the manual user.

I've been trying variations on this theme and found that I could fix this problem
for some applications with this ...

try
tell application "TextEdit"
activate
open fileAlias --> error = -1700
end tell
on error errText number errNr
activate me
"Open error = " & errNr & return & errText
tell me to display dialog the result
return
end try

Notice that fixing the problem simply requires telling "TextEdit" to activate . 
I don't know why this works, it just does.
This may work with other applications, but it does not work with the Finder.

The problem with the Finder is a totally different problem which I will describe in a new thread.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Open Bugs
      • From: Luther Fuller <email@hidden>
References: 
 >Open Bugs (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Open Bugs
  • Next by Date: Re: Open Bugs
  • Previous by thread: Re: Open Bugs
  • Next by thread: Re: Open Bugs
  • Index(es):
    • Date
    • Thread