• 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: Simple Drag-n-drop action
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple Drag-n-drop action


  • Subject: Re: Simple Drag-n-drop action
  • From: Rob Stott <email@hidden>
  • Date: Fri, 02 Aug 2002 14:14:22 +0100

Hi Steen,

Try the following;

on open theDroppedFolder

tell application "Finder"

repeat with theFolder in theDroppedFolder
set theType to get kind of theFolder
if theType is "folder" then
try
make new folder at theFolder with properties
{name:"Fonts"}
make new folder at theFolder with properties
{name:"Scans"}
make new folder at theFolder with properties
{name:"Illustrations"}
on error
display dialog "Couldn't create the folders for some
reason"
end try

else
display dialog "This script only works if you drop folders"
end if
end repeat
end tell

end open




Remember to save it as an application though.
Hope this helps,
Rob



On 2/8/2002 12:28 pm, "Steen Villumsen" <email@hidden> wrote:

> I'm making my first script ment for drag-and-dropping something on it.
> It's very simple but i just can't figure out the syntax.
> What i want the script to do is lie on my desktop, and when i drag a
> folder on to it, I want it to produce 3 folders within the dragged
> folder, the 3 folders should be named "Fonts", "Illustrations" and
> "Scans"..
--

Rob Stott
Artwork Designer
Airfix/Humbrol Ltd
Marfleet
Kingston upon Hull
HU9 5NE

Tel: +44 (0) 1482 716691
Fax: +44 (0) 1482 781781
Mob: +44 (0) 7881 811533

'Y'know... For kids!" - Norville Barnes
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Simple Drag-n-drop action (From: Steen Villumsen <email@hidden>)

  • Prev by Date: Re: update images in Quark (recall)
  • Next by Date: Re: Move a sound file
  • Previous by thread: Simple Drag-n-drop action
  • Next by thread: Geometry problems
  • Index(es):
    • Date
    • Thread