 |
 |
Basic Applescript Help
|
 |
|
 |
|
Mac Elite
Join Date: Jun 2001
Location: Utah
Status:
Offline
|
|
Hi all.
Mods, please move this if it's in the wrong place.
I need help finding/writing an applescript. Here's what I'd like to do:
My students email me their essays so I can comment on them. I'd like to be able to attach an applescript to the folder I keep them in that sets the label for any item added to it to "red."
Can anyone help?
Thanks in advance.
Cheers
Scott
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2001
Status:
Offline
|
|
If you know how to attach scripts to folders try this:
Code:
on adding folder items to this_folder after receiving these_items
try
repeat with this_item in these_items
tell application "Finder" to set label index of this_item to 2
end repeat
on error error_message number error_number
if the error_number is not -128 then
tell application "Finder"
activate
display dialog error_message buttons {"Cancel"} default button 1 giving up after 120
end tell
end if
end try
end adding folder items to
Hope that helps.
-
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jun 2001
Location: Utah
Status:
Offline
|
|
Thanks! Unfortunately, unless I'm doing something wrong, it's not working.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2001
Status:
Offline
|
|
Originally posted by midwinter:
Thanks! Unfortunately, unless I'm doing something wrong, it's not working.
For me it works fine.
You need to put in in your in either your private or the global "Folder Action Scripts" folder and turn Folder Actions on and attach it to your folder.
http://www.apple.com/applescript/folderactions/
-
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jun 2001
Location: Utah
Status:
Offline
|
|
Originally posted by Moonray:
For me it works fine.
You need to put in in your in either your private or the global "Folder Action Scripts" folder and turn Folder Actions on and attach it to your folder.
http://www.apple.com/applescript/folderactions/
-
A-ha!
Thankyouthankyouthankyou!!!
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2001
Status:
Offline
|
|
Welcome
-
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jun 2001
Location: Utah
Status:
Offline
|
|
Originally posted by Moonray:
Welcome
-
You have to understand two things:
1) I will get somewhere around 80 essays via email to comment on between now and Monday.
2) I never understood the big deal about labels until I started using them to indicate which ones I'd commented on and which ones I hadn't. Now, the ones that are red are new, the ones that are finished are green. And so, because I've discovered the amazing usefulness this thing that Mac users have been on to for what, a decade (?), my life is a little easier.
And you have helped immensely.
Thanks, again.
Cheers
Scott
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |