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 | ||
token:ActionResult [2016/06/22 19:15] JMichaelTX ADD header and details; ADD Example with screenshots |
token:ActionResult [2016/12/13 19:14] JMichaelTX Add Keywords |
||
---|---|---|---|
Line 4: | Line 4: | ||
===== Value Returned ===== | ===== Value Returned ===== | ||
- | **The //%ActionResult%// token returns text indicating the success or failure of the immediate past action.** | + | **The //[[token:ActionResult|%ActionResult%]]// token returns text indicating the success or failure of the immediate past action.** |
* **If Successful**, Then "**//OK//**" is returned. | * **If Successful**, Then "**//OK//**" is returned. | ||
* Otherwise, a message describing the reason for failure is returned. | * Otherwise, a message describing the reason for failure is returned. | ||
Line 10: | Line 10: | ||
===== How To Use ===== | ===== How To Use ===== | ||
- | Note that this value is reset at the end of every action, so you must immediately text it or save it into a variable if you wish to preserve it. | + | Note that this value is reset at the end of every action, so immediately after the Action, you must save the //[[token:ActionResult|%ActionResult%]]// token [[action:Set_Variable_to_Text|into a variable]], or use it in a control flow action, like a [[action:If_Then_Else|If/Then Action]]. |
+ | |||
+ | You can use this token for error handling, much like a traditional try/catch/on error construct. But you have to build your own test immediately after the action. Keyboard Maestro will **not** throw an error in most cases. | ||
===== Examples ===== | ===== Examples ===== | ||
Line 34: | Line 36: | ||
{{:token:km-7.1-test-action-result.png?nolink|}} | {{:token:km-7.1-test-action-result.png?nolink|}} | ||
+ | ===== See Also ===== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Actions ==== | ||
+ | |||
+ | * [[action:Copy|Copy]] | ||
+ | * [[action:If Then Else|If Then Else]] | ||
+ | * [[action:Set Variable to Text|Set Variable to Text]] | ||
+ | * [[:Actions|See all Actions]] | ||
+ | |||
+ | ==== Tokens ==== | ||
+ | |||
+ | * [[:Tokens|See all Tokens]] | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Manual ==== | ||
+ | |||
+ | * [[:manual:Tips#Pay Attention to the Gear Icon|Pay Attention to the Gear Icon]] | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Forum ==== | ||
+ | |||
+ | - [[https://www.google.fr/search?q=site:forum.keyboardmaestro.com+ActionResult|Keyboard Maestro Forum topics about %ActionResult% token]] | ||
+ | |||
+ | ==== Keywords ==== | ||
+ | |||
+ | Action Result, Action Results, Action Failure, Action Success | ||