In an attempt to add something useful, here's an update to the previous AS-based macro that includes a return value so you can test to see if the "wrapped" action completed or timed out. Run it with and without some text selected to see the difference.
Variable Timeout Demo (with result).kmmacros (5.9 KB)
You can see the changes are easy enough -- since we've gone from a single to more than one action in the XML it is now an <array>
of <dict>
s, so add your extra action's XML then wrap the whole in array tags. The text returned by the "Return" action is saved in theResult
, which the AS then return
s to KM. You don't need those two lines, you can do it one with return (do script theXML)
, but that ends the AS and you may want to do something between the embedded macro completing and the script finishing.