This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
manual:Scripting [2017/09/10 22:26] peternlewis |
manual:Scripting [2018/03/18 04:31] peternlewis Keyboard Maestro editor |
||
---|---|---|---|
Line 165: | Line 165: | ||
</code> | </code> | ||
- | You can ask Keyboard Maestro Engine to process tokens for you with: | + | You can ask Keyboard Maestro Engine to find strings in other scripts: |
<code applescript> | <code applescript> | ||
tell application "Keyboard Maestro Engine" | tell application "Keyboard Maestro Engine" | ||
- | set clip to process tokens "%PastClipboard%3%" | + | count found in "The Source" for ".e" with regex |
+ | end tell | ||
+ | </code> | ||
+ | |||
+ | And you can search and replace with: | ||
+ | |||
+ | <code applescript> | ||
+ | tell application "Keyboard Maestro Engine" | ||
+ | search "3+4" for "(\\d+)" replace "%CalculateFormat%CALCULATE(\\1)%Currency%" with regex and process tokens | ||
end tell | end tell | ||
</code> | </code> | ||
Line 203: | Line 211: | ||
==== Editor ==== | ==== Editor ==== | ||
- | Another way you can control Keyboard Maestro Editor is using the "`keyboardmaestro`" URL scheme, which supports the following formats: | + | Another way you can control Keyboard Maestro editor is using the "`keyboardmaestro`" URL scheme, which supports the following formats: |
^ Example Editor URL Command ^ Description ^ | ^ Example Editor URL Command ^ Description ^ |