Droplet Help

Hi I was wondering if anyone could help me allow this script to recognize drag and drops, launch, and carry out the same thing it does in the normal script (Backup a folde or file to another folder or file). Here’s the script.

set theAsk to display dialog “What would you like to name this backup?” default answer “” buttons {“Next”} default button 1
set theGo to text returned of theAsk
display dialog “Do you want to back up a file or folder?” buttons {“File”, “Folder”, “Cancel”} default button “File”
if button returned of result = “File” then
set theStart to (choose file with prompt “Select a file:”) as string
else if button returned of result = “Folder” then
set theStart to (choose folder with prompt “Select a folder:”) as string
end if

set theDate to (current date)
set theTime to time string of theDate
set AppleScript’s text item delimiters to “:”
set theParts to text items of theTime
set AppleScript’s text item delimiters to “.”
set theWhole to theParts as string
set timeStamp to (weekday of theDate as string) & ", " & month of theDate & " " & day of theDate & “, " & year of theDate & " " & theWhole
set instantFolder to (theGo & " Backup —” & timeStamp)

set theTarget to ((path to library folder from user domain as text) & “Auto-BackupDataHD:”)

tell application “Finder”
set theFinish to (make new folder at folder theTarget with properties {name:instantFolder})
duplicate alias theFile to theFinish
end tell

Try this:

on run
	display dialog "Do you want to back up a file or folder?" buttons {"Cancel", "Folder", "File"} default button "File"
	if button returned of result = "File" then
		choose file with prompt "Select a file:"
	else
		choose folder with prompt "Select a folder:"
	end if
	open ({result})
end run

on open (theItem)
	set theItem to (item 1 of theItem)
	
	display dialog "What would you like to name this backup?" default answer "" buttons {"Next"} default button 1
	set theGo to text returned of result
	
	set timestamp to (do shell script "date +%A,\\ %B\\ %e,\\ %Y\\ %I.%M.%S\\ %p")
	set targetName to (theGo & " Backup --- " & timestamp)
	set targetPath to ((path to library folder from user domain as text) & "Auto-BackupDataHD:")
	
	tell application "Finder"
		set theTarget to (make new folder at folder targetPath with properties {name:targetName})
		duplicate theItem to theTarget
	end tell
end open

Model: Mac mini
AppleScript: 1.10
Browser: Safari 412
Operating System: Mac OS X (10.4)