• 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
"info for" weirdness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"info for" weirdness


  • Subject: "info for" weirdness
  • From: "Marc K. Myers" <email@hidden>
  • Date: Sat, 8 Mar 2003 02:11:30 -0500

I wrote a little droplet to display file information. It contains this code:

on run
--display dialog "This script functions only as a droplet" buttons {"Cancel"} default button 1
open ((choose file) as list)
end run

on open(inItems)
repeat with anItem in inItems
if last character of (anItem as text) is not ":" then
report(anItem as alias)
end if
end repeat
end open

on report(theFile)
set theInfo to info for theFile
tell theInfo
set theName to name
set creDate to creation date
set modDate to modification date
set fType to file type
set fCreate to file creator
set bAlias to alias of theInfo
end tell
if bAlias then
set aliasMsg to return & return & "This file is an alias"
else
set aliasMsg to ""
end if
activate
display dialog theName & return & return & ,
"Creation date: " & formDate(creDate) & return & ,
"Mod date: " & formDate(modDate) & return & ,
"File type: " & fType & return & ,
"File creator: " & fCreate & ,
aliasMsg
end report

When I execute it from Script Editor the "This file is an alias" message is displayed. When I execute it as a droplet using the same alias file it isn't. I can't debug it because it works just fine in Script Editor. Has anyone got a clue as to why I'm getting this behavior? I'm running the standard AppleScript installation under OS 10.2.4.

Marc [03/08/03 2:11:25 AM]
_______________________________________________
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.

  • Follow-Ups:
    • way to get XML attributes
      • From: Darwin Zins <email@hidden>
    • Re: "info for" weirdness
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Mail Mobius trick
  • Next by Date: Re: Searching for the equivalent of coercing to type "record"
  • Previous by thread: Mail Mobius trick
  • Next by thread: Re: "info for" weirdness
  • Index(es):
    • Date
    • Thread