• 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
Scripting icon copying: Finder barfs - howcome?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scripting icon copying: Finder barfs - howcome?


  • Subject: Scripting icon copying: Finder barfs - howcome?
  • From: Charles Arthur <email@hidden>
  • Date: Mon, 26 Feb 2001 18:52:15 +0000

Why doesn't this work? I'd like to automate some icon-copying and was
trying to do a demonstration of what I meant.

So of course it wouldn't work. Yet the Finder dictionary (9.0.4, AS 143,
inside leg 32) gives "item" as having "icon" as a property; and files get
inheritance from item.

Here's the scriptlet:

tell application "Finder"
choose file with prompt "Choose something with an icon to copy"
set theicon to icon of selection
choose file with prompt "Choose a file whose icon you want to change"
set thefile to icon of selection
activate
end tell

It keeps refusing to copy the icon and throws up various refusals,
sometimes at different points. What am I overlooking?

Charles

----------------------------
http://www.ukclimbing.com : 1000+ British crags, 350+ British climbing
walls - searchable by distance and anything else you care to think of -
with weather forecasts for every one, plus maps, articles, news and
features. Plus Britain's busiest climbing discussion boards. And there's
even a cool shop attached.


  • Follow-Ups:
    • Re: Scripting icon copying: Finder barfs - howcome?
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: random scatter
  • Next by Date: Re: Selecting every item of one disk's desktop
  • Previous by thread: Re: random scatter
  • Next by thread: Re: Scripting icon copying: Finder barfs - howcome?
  • Index(es):
    • Date
    • Thread