Helmi
Nov 09, 2008, 11:09 PM
Hi,
unfortunately i'm everything else but a apple script guru. Probably somone can help rewriting this apple script for pathfinder. Originally it was an app that brings a textmate button to finder and opens files or folders on click or drag in textmate. I'm so completely used to it so i wanted to port it to pathfinder.
-- Opens the currently selected Finder files, or else the current Finder window, in TextMate. Also handles dropped files and folders.
-- By Henrik Nyh <http://henrik.nyh.se>
-- Based loosely on http://snippets.dzone.com/posts/show/1037
-- script was clicked
on run
tell application "Finder"
if selection is {} then
set finderSelection to folder of the front window as string
else
set finderSelection to selection as alias list
end if
end tell
tm(finderSelection)
end run
-- script was drag-and-dropped onto
on open (theList)
tm(theList)
end open
-- open in TextMate
on tm(listOfAliases)
tell application "TextMate"
open listOfAliases
activate
end tell
end tm
And after converting the code...what would be the best way to start this script? Also insert it as a button in pathfinder? Is that possible?
Thanks for helping!
unfortunately i'm everything else but a apple script guru. Probably somone can help rewriting this apple script for pathfinder. Originally it was an app that brings a textmate button to finder and opens files or folders on click or drag in textmate. I'm so completely used to it so i wanted to port it to pathfinder.
-- Opens the currently selected Finder files, or else the current Finder window, in TextMate. Also handles dropped files and folders.
-- By Henrik Nyh <http://henrik.nyh.se>
-- Based loosely on http://snippets.dzone.com/posts/show/1037
-- script was clicked
on run
tell application "Finder"
if selection is {} then
set finderSelection to folder of the front window as string
else
set finderSelection to selection as alias list
end if
end tell
tm(finderSelection)
end run
-- script was drag-and-dropped onto
on open (theList)
tm(theList)
end open
-- open in TextMate
on tm(listOfAliases)
tell application "TextMate"
open listOfAliases
activate
end tell
end tm
And after converting the code...what would be the best way to start this script? Also insert it as a button in pathfinder? Is that possible?
Thanks for helping!