A Header Image I created for my blog article about my playing with automator & AppleScript
I’ve never really been a programmer, but I always have been a geek. One thing that I think is kind of cool about my transition from Windows to a Mac has been a lot of the utilities. One utility that I have tried a couple of times to play with, but I haven’t found an interesting enough use (or been able to figure out how to do uses that I did want to do). Automator) on the Mac is a pretty powerful application. Doing some research, there could be some applications that could be downloaded used in Windows, but nothing built in like automator and services.
Another application that I have been loving has been TextExpander. For some reason, with all of my popup select features (I think it’s because I’m syncing it with Phrase Express on Windows). I created a service which uses an AppleScript which searches copied text for the “
|” and replaces it with “:” a pretty simple apple script is below (Its probably not very efficient, but it’s my first one.
on replace_chars(this_text, search_string, replacement_string) set AppleScript's text item delimiters to the search_string set the item_list to every text item of this_text set AppleScript's text item delimiters to the replacement_string set this_text to the item_list as string set AppleScript's text item delimiters to "" return this_text end replace_chars set the message_text to get the clipboard set the message_text to replace_chars(message_text, "|", ":") return message_text