• 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: Thomas Fischer <email@hidden>
  • Date: Thu, 19 Jan 2012 10:57:52 +0100

Hello Luther,

the little script below worked as expected (on Snow Leopard) when I first selected a file on a USB stick and later unmounted the stick, giving a message about being unable to coerce the alias:

"Problem:\r„TextEdit“ hat einen Fehler erhalten: alias \"/Volumes/TH_FISCHER/solr.xml\" kann nicht in Typ alias umgewandelt werden. (-1700)"

So for an unmounted volume this seems to be OK. If I remove the right to read from the file, I get the result you described.
With "Finder" instead of "TextEdit", I get

"Problem:\r„Finder“ hat einen Fehler erhalten: Das Volume „some object“ wurde nicht gefunden. (-35)"

for an unmounted device. And again, with insufficient privileges, a Finder message appears which isn't trapped by the script.
With links to a disk image, my experience was that the Finder mounted the disk in a first try, but didn't find the file before a second try; after an appropriate delay the second try worked. 

property fileAlias : ""
if fileAlias is "" then set fileAlias to choose file
try
tell application "TextEdit" to open fileAlias
on error theErr number theNum
display dialog "Problem:" & return & theErr & " (" & theNum & ")"
end try

Best
Thomas
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
References: 
 >Open Bugs (From: Luther Fuller <email@hidden>)

  • Prev by Date: Get OS version of iOS device connected to Mac OS X
  • Next by Date: Re: Open Bugs
  • Previous by thread: Open Bugs
  • Next by thread: Re: Open Bugs
  • Index(es):
    • Date
    • Thread