Do TextExpander Snippet - Plugin Action


Do TextExpander Snippet

by Ian Kirkland



Description

This plugin action is about as self-explanatory as they come: it executes a TextExpander snippet. This can be useful for a number of reasons such as triggering an expansion with a hotkey as opposed to a typed string. Who knows? You could probably create some interesting automations by pairing the action with things like Keyboard Maestro’s conditionals and Macro Information tokens.

To use, simply enter the snippet’s abbreviation into the text field and this action will do the rest. It’s worth noting that this plugin action executes TextExpander snippets via scripting, not by crudely simulating key presses.



Action

Enter abbreviation. Boom! You’re all set.




Additional Notes

  • As stated above, this action uses a script under the hood, not a miniature monkey typing abbreviations
  • I couldn’t find a way to trigger snippets by label / name without exhaustively looping into the DOM. If anyone knows a way, please let me know.
  • If you come up with any creative uses for the action, please share them here in the comments
  • Please report any bugs at: ianthekirkland@me.com



Download

Download Action:  Do TextExpander Snippet.zip (595.3 KB)



Legal

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


1 Like

I can’t add the plugin. I’m dragging it to KM icon on dock but nothing happens. Is there any other way to add it?

Yes. Just unzip the file (which contains a folder with 3 files in it). Then put that folder into this folder…

~/Library/Application Support/Keyboard Maestro/Keyboard Maestro Actions/

Let me know if that doesn’t work, so I can (a) get you one that works and (b) make sure it isn’t broken or something.

Thanks for downloading!

Ian

thanks, it worked with the provided instructions.
it did not work when dropping the zip into the km icon though

thanks!

Hi, I’m using the plugin. It is quite useful.

I have 1 suggestion though, the message Invalid Plug In Results km-do_textexpander_snippet keeps appearing in KM log. Sometimes it makes difficult to debug other macros. Does this behaviour happens to you too?

Thanks for the heads up. Let me look into this. I’m thinking I might need to explicitly give a Keyboard Maestro Engine the equivalent of a ‘results=0’ or ‘result=null’. I’ll get back with you.

@eduardinho
I’m getting that same message. I’m getting it for nearly all my plugins though. Honestly, I can’t figure out what’s causing it. I’ll keep fiddling and if I find an answer I’ll post it here.

My apologies for the headache it causes in Console.

that’s ok. I only use console to debug some issues o it’s not frequent, but anyway. the plugin is really useful