set tags to {%@}
tell application "Leap" to activate
tell application "System Events" to click menu item "All Tagged" in menu "Go" of menu bar item "Go" in menu bar 1 of process "Leap"
tell application "System Events" to click menu item "Tag Filter…" in menu "File" of menu bar item "File" in menu bar 1 of process "Leap"
set oldClipboard to the clipboard

repeat with tag in tags
	set the clipboard to tag
	tell application "System Events" to click menu item "Paste" in menu "Edit" of menu bar item "Edit" in menu bar 1 of process "Leap"
	delay 0.5
	tell application "System Events" to keystroke return
	delay 0.5
end repeat

set the clipboard to oldClipboard