• 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: Applet to change all file icons to generic document icon
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Applet to change all file icons to generic document icon


  • Subject: Re: Applet to change all file icons to generic document icon
  • From: JJ <email@hidden>
  • Date: Mon, 11 Jun 2001 16:22:09 +0200

> This is an elementary level 0 question, as I rarely use Applescript. I want
> to test iDisk speed of a website containing 500 items, with/without their
> normal icons, some of which are previews generated by Graphics Converter. I
> find that iDisk is really not useable for site maintenance due to slow
> Finder operations, and I reasoned that icons might be a part of the problem.
>
> I can easily script an applet that process all the dropped folder contents -
> e.g., to change Comments. But how do I change the icon value? I.e.,
>
> tell application "Finder" to set icon of my_info to <what?>
>
--

If you9re working for 3web ready2, you may also, delete every resource
3fork2 (icons, "FISH", "styl", etc.). Images > icons. HTML files > style.

Try this (using "akua sweets" commands):

tell application "Finder"
repeat with i from 1 to count items of the selection
set t_item to item i of the selection as alias
try
set the_resources to ,
(open fork from t_item with write access and resource fork)
size fork the_resources to 0 -- delete every resource fork
close fork the_resources with flushing
on error
close fork the_resources with flushing
display dialog "There was a problem!" with icon 0
return
end try
end repeat
display dialog "It's done!" with icon 1
end tell

* It works using the Finder selection, so, change it or be careful!

** You can use "GraphicConverter" to delete fork resources, too
(from supported formats, only):
File > Convert
(make your selection, press Command and, where it was
"Icon/preview", will appear "Del. Resource")

*** If you want only delete icons, you can use akua sweets:
the resource of type "icl4" in t_item with removal
the resource of type "icl8" in t_item with removal
the resource of type "ICN#" in t_item with removal
the resource of type "icns" in t_item with removal
the resource of type "ics#" in t_item with removal
the resource of type "ics4" in t_item with removal
the resource of type "ics8" in t_item with removal

But your file will posses, still:
the resource of type "PICT"
the resource of type "pnot"
the resource of type "STR "
the resource of type "vers"


JJ


  • Prev by Date: Re: Playing with Objects
  • Next by Date: Re: Selecting links in Communicator
  • Previous by thread: Applet to change all file icons to generic document icon
  • Next by thread: [mac os x] count of messages from mail
  • Index(es):
    • Date
    • Thread