User Name
Password
AppleNova Forums » Genius Bar »

concerning folder actions


Register Members List Calendar Search FAQ Posting Guidelines
concerning folder actions
Thread Tools
VOX BARBARA
Member
 
Join Date: May 2004
 
2004-06-14, 08:11

I'd like to add a particular folder action to a folder. This folder action script should label every ".pdf" inside the folder with a particular color, which i have choosed before. Example: if i drag a "pdf" into that particular folder, that pdf should change its label. Or, else, if i save a .doc document as a ".pdf" into the same folder (that one with folder action) the pdf should change its label. How to?

hints appreciated.

best

Reality is that which, when you stop believing in it, doesn't go away.
--Philip K. Dick
  quote
deeg
New Member
 
Join Date: Jul 2004
Location: Feeding iTunes
 
2004-07-02, 10:39

this any help ?
Code:
-- hacked apple droplet script to apply labels on pdf's via folder actions property type_list : {"PDF"} property extension_list : {"pdf"} -- check for file or folder in added items and process as required on adding folder items to this_folder after receiving added_items repeat with i from 1 to the count of added_items set this_item to (item i of added_items) set the item_info to info for this_item if folder of the item_info is true then process_folder(this_item) else if (alias of the item_info is false and the file type of the item_info is in the type_list) or (the name extension of the item_info is in the extension_list) then process_item(this_item) end if end repeat end adding folder items to -- this sub-routine processes folders on process_folder(this_folder) set these_items to list folder this_folder without invisibles repeat with i from 1 to the count of these_items set this_item to alias ((this_folder as text) & (item i of these_items)) set the item_info to info for this_item if folder of the item_info is true then process_folder(this_item) else if (alias of the item_info is false and the file type of the item_info is in the type_list) or (the name extension of the item_info is in the extension_list) then process_item(this_item) end if end repeat end process_folder -- this sub-routine processes files on process_item(this_item) tell application "Finder" set label index of this_item to 1 end tell end process_item
save it as a compiled script in your hd>library/scripts/folder actions, then on the menu bar script addition, under folder actions, there is a script to add your saved script to a folder... change the label index value to alter the colour (1 is orange for example)
  quote
Posting Rules Navigation
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Post Reply

Forum Jump
Thread Tools

« Previous Thread | Next Thread »

All times are GMT -5. The time now is 07:19.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2024, AppleNova