I use Better Finder Renamer a lot and I often highlight a list of files and the right click and go to the service “Better Renamer 9…” which sends it there. It would be awesome to be able to hit a trigger instead of going to the right click–>service, but I haven’t found any info in the documentation or the forum on how to do this. Does anyone have hints?
For anyone looking for this app, it's called "A Better Finder Rename" and can be found at http://www.publicspace.net/ABetterFinderRename/. This is one of those application that I don't use a lot, but when I do, it's worth every penny I paid for it.
Thanks so much guys. Looking forward to trying these. The services app looks awesome too.
For what ever reason the shortcut won’t work on my system when I do it straight from the keyboard system preferences. That was my first thing I tried a while ago.
True, sometimes a shortcut doesn’t work immediately after assigning it. However, in my experience it will work, either after quitting/reopening the application, or —at latest— after a restart or re-login. In fact, I don’t have a Service shortcut that doesn’t work.
#2 It is a simple Automator workflow that I made which runs an AppleScript. I just spent 20 minutes looking for from whom or where I got the AppleScript, but I didn’t find it. It might be from macautomation.com - Sal’s site.
The AppleScript:
on run {input, parameters}
tell application "Safari"
try
if not (exists document 1) then error "No document is open."
set theURL to URL of document 1
try
get theURL
on error
error "The front document has no URL."
end try
set thisTitle to name of document 1
repeat
if thisTitle is not "" then exit repeat
end repeat
-- encode every character to unicode: ᇗ
repeat with i from 1 to the length of thisTitle
set thisID to the id of (character i of thisTitle)
if i is 1 then
set theTitle to "&#" & thisID & ";"
else
set theTitle to theTitle & "&#" & thisID & ";"
end if
end repeat
set startEcho to "echo "
set echoDelimiter to "'"
set html_1 to "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
<meta http-equiv=\"Content-Style-Type\" content=\"text/css\">
<title>"
set html_2 to "</title>
<meta name=\"Generator\" content=\"Cocoa HTML Writer\">
<meta name=\"CocoaVersion\" content=\"1038.11\">
<style type=\"text/css\">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
</style>
</head>
<body>
<p class=\"p1\"><a href=\""
set html_3 to "\">"
set html_4 to "</a></p>
</body>
</html>"
set echoCommand to startEcho & echoDelimiter & html_1 & theTitle & html_2 & theURL & html_3 & theTitle & html_4 & echoDelimiter
set textutilCommand to " | textutil -convert rtf -inputencoding UTF-8 -format html -stdin -stdout"
set pbcopyCommand to " | pbcopy -Prefer rtf"
set entireCommand to echoCommand & textutilCommand & pbcopyCommand
do shell script entireCommand
tell application "System Events" to keystroke "v" using {command down}
set the target_file to the quoted form of the POSIX path of (((path to "ssnd") as string) & "Pop.aiff")
do shell script "afplay " & target_file
on error error_message
activate
display alert "Error Running Service" message error_message
end try
end tell
return input
end run
The APPLICATION special case was added to the Select Menu Action more or less specifically so you could access the Services menu. It has other purposes, but that is the most obvious one.