![]() ![]() Having got this far anything else is just a getting the text is quite a big deal. Obvious examples where this would be useful include Markdown. I’ve tested this with Sublime Text and it wraps the selected text nicely and substitutes back in. The second uses Insert Text By Typing to wrap the input text with "BLAH"s. The trigger value is indeed filled in with the selected text. One uses Display Text with the following in it: Right now I’ve got two actions working in the test script: That shell variable is what PopClip uses to pass the selected text when it’s invoked. Osascript -e “tell application “Keyboard Maestro Engine” to do script “Test One” with parameter “$POPCLIP_TEXT”” It uses a one-line shell script with the following in: Thanks happy to report I’ve got a VERY basic PopClip extension working… It would just be a shame to have to re-implement the PopClip extensions and functions. However, I can see KM and PC “clashing” in this case, so PC would have to go. No, if a trigger for a KM workflow could be text selection then PopClip isn’t needed. Quite possibly Option 1 is better than Option 2. What would be really nice would be to build an extension that connected to a Keyboard Maestro workflow.Īs PC extension actions can be shell scripts, (built in interpreter) PHP scripts, likewise Ruby, I don’t think this is beyond the realms of possibility. You can build your own PopClip extensions very easily - and indeed I cloned the “upper case” one and examined its contents yesterday. A third is to do the arithmetic in the selected text. A simple example of an installable one is changing the text to upper case. The built in ones do things like copiying to the clipboard. A few are built in but many are installable. Update : Moved extensions list lo linked forum post.… When you select some text it immediately pops up a bar of actions. Update : Post edited and fleshed out following the release of PopClip 2021.9. I will also put out documentation for creating your own JavaScript extensions in due course. ![]() I will keep this post the forum post updated as I go. It’s going to take me some time to port all the remaining PHP extensions to JavaScript. Having the scripting system built into the app also opens up new possibilities for what PopClip extensions can do. The new extensions are lightning fast, and hopefully now future proof. PopClip runs the JavaScript code directly, instead of calling out to an external executable. Instead, I have updated PopClip to support a new kind of extension, written in JavaScript. I don’t fancy maintaining a PHP runtime distribution. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |