TextExpander and APEX
Who doesn’t love a shiny object? In this case I’m talking about tools; tools that make our life easier. TextExpander (Mac only ‡) is one of those tools. (No, I don’t get paid to say this and no I didn’t get a free license either.)
Basically, TextExpander allows you to assign some letters to be expanded into lots of letters. For example you type wwbr and TextExpander will change that to “With best regard, {your name}”
Here are some of the ones I use with APEX:
Abbreviation: aurl
Snippet:
f?p=&APP_ID.:&APP_PAGE_ID.:&SESSION.:Request:Debug:ClearCache:itemNames:itemValues:PrinterFriendly
This one is pretty straight forward, I type aurl (which reminds me of APEX URL) and a full APEX URL gets pasted into whatever textbox or editor my cursor happens to be. This is a nice way to remember or avoid typing all the positional parameters.
Abbreviation: ;;asl
Snippet:
f?p=&APP_ID.:%clipboard:&SESSION.:
%clipboard is a TextExpander keyword that will use the contents of the clipboard.
I simply: 1) type a page number, 2) cut it to my clipboard, 3) type ;;asl and as I hit tab or space, the abbreviation gets expanded and the URL gets added with the page number I wish to redirect to.
Here are a couple more:
;;anchor → <a href="f?p=&APP_ID.:PAGE:&SESSION.:">%clipboard</a>
This one will paste the contents of the clipboard as the link name, then I just need to edit PAGE to the correct destination.
gaevnt → onClick="_gaq.push(['_trackEvent', pName, 'ACTION', 'LABEL']);"
This is a Google Analytics Event. There was a project where several links and buttons required a GA event added. I still had to change the ACTION and LABEL manually, but this avoided a lot of typos.
In the previous example, I could have used TextExpander Fill-In Fields feature to open a “form” where I could fill in (ACTION and LABEL). You could also execute a script (In Python, Ruby, etc…) and use the output as the expanded result. You can see how the sky is the limit here.
I think you get the idea. We’ve only scratched the surface of what TextExpander can do. Perhaps you have canned email responses you need to send every so often. Or you transpose letter in certain words. Or need to use different email signatures depending on the destination. I just wanted to get you introduced to this workflow that perhaps can save you some keystrokes in APEX or otherwise.
Please share some other ways you can use this type of tool.
‡ TextExpander is a Mac only application. However, a quick search shows there are several Windows alternatives, some even import TextExpander snippets.
I love comments, write me a line