Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > AppleScript Help

AppleScript Help
Thread Tools
genevish
Mac Enthusiast
Join Date: Jan 1999
Location: Marietta, GA, USA
Status: Offline
Reply With Quote
Dec 8, 2003, 02:24 PM
 
I'm trying to create a simple Folder Action that will automatically file added files based on extension, and I have been stumped all morning. Here's where I am so far:

Code:
on adding folder items to this_folder after receiving these_items repeat with i from 1 to number of items in these_items set this_item to item 1 of these_items set this_item_info to info for this_item set this_extension to name extension of this_item_info display dialog "The extension is " & this_extension if (this_extension is jpg) then tell application "Finder" move alias this_item to folder "Pics" of this_folder end tell end if end repeat end adding folder items to
I'm thinking I need to add the full path of the folder in question or something, but I'm not sure where to go.
Scott Genevish
scott AT genevish DOT org
     
Brass
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status: Offline
Reply With Quote
Dec 8, 2003, 05:31 PM
 
I haven't tried compiling or running your script, but do you need quotes around "jpg"?
     
genevish  (op)
Mac Enthusiast
Join Date: Jan 1999
Location: Marietta, GA, USA
Status: Offline
Reply With Quote
Dec 8, 2003, 07:21 PM
 
No, that wasn't it, but I tried some more tinkering and found it. All I did was take out the word alias. I was sure I tried that before, but I guess I didn't.
Scott Genevish
scott AT genevish DOT org
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 03:39 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,