User Tools

Site Tools


manual:Scripting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
manual:Scripting [2017/09/08 04:26]
peternlewis
manual:Scripting [2017/11/06 01:54]
peternlewis added count found in and search and replace
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 185: Line 193:
 </​code>​ </​code>​
  
-Alternatively you can use the [[/action/​Set_Macro_Enable|Set Macro Enable action]].+Alternatively you can use the [[action:​Set_Macro_or_Group_Enable|Set Macro Enable action]].
  
 You can rename, create, delete, duplicate macro groups and macros. ​ You can add and remove actions. ​ You can get or set the selection. You can rename, create, delete, duplicate macro groups and macros. ​ You can add and remove actions. ​ You can get or set the selection.
manual/Scripting.txt · Last modified: 2023/10/04 04:27 by peternlewis