Can you "Get selected Finder Items" without using Automator?

Hi all,

I’m trying to make a script that will allow me to highlight some items in the Finder, then press a hotkey to move them to some pre-determined folder (i.e. pressing ctrl-top-cmmd-m would move them to the Movies folder.

This is a simple enough script to create for triggering, except for the “Get selected Finder items.” I certainly don’t want to make a droplet (why not just put an alias to the older instead of the droplet?" Creating a workflow in Automator is simple, but invoking the workflow is SUPER SLOW. I’d be better off moving the files manually.

So then, I ask pessimistically, is there a way to get AppleScript to recognize the items that you have selected in the Finder without using Automator?

Thank you,

Dave

Model: MacBook Pro
Browser: Firefox 2.0.0.13
Operating System: Mac OS X (10.5)

Hi Dave,

of course you can, Automator is actually only a GUI for AppleScript snippets


tell application "Finder"
	set theSelection to selection
	repeat with oneItem in theSelection
		-- do something
	end repeat
end tell