Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jacktabby

macrumors newbie
Original poster
Feb 7, 2010
10
0
Australia
I am making an applescript droplet that does the following:
You drag a file to it and it moves it the this folder: /Users/Jack/.Trash

This is my script so far:

on open the_Droppings
display dialog "Are You Sure You Want Move The Dropped Item(s) to the Trash?" buttons {"Yes", "No"}
if the button returned of the result is "Yes" then


else
quit application
end if
end open


I don't know what to type after:
if the button returned of the result is "Yes" then

I was thinking along the lines of:
tell application "Finder"
move dropped files to "/Users/Jack/.Trash"
end tell


Thank you for taking the time to read my post and hopefully you can help.

P.S. Please don't give me the move to trash command. I want to do it like this for a reason. Thanks. :)
 
Code:
on open the_Droppings
	display dialog "Are you sure you want to move the dropped item(s) to the trash?" buttons {"Yes", "No"}
	if the button returned of the result is "Yes" then
		tell application "Finder" to move the_Droppings to the trash
	end if
end open

mt
 
Here's your way of doing it without the "move to trash" command.

Code:
repeat with a_Dropping in the_Droppings
	do shell script "mv " & (quoted form of POSIX path of (a_Dropping as alias)) & " /Users/numero/.Trash/"
end repeat

I don't see any advantage to doing it this way? Why do you want to do this?

-numero
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.