User Tools

Site Tools


token:ActionResult

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
token:ActionResult [2016/06/22 19:20]
JMichaelTX ADD links to how to use
token:ActionResult [2021/10/14 05:06] (current)
peternlewis
Line 1: Line 1:
-{{:​macro-action-icon.png?​nolink|}} 
 ====== ActionResult Token ====== ====== ActionResult Token ======
  
-===== Value Returned =====+The **%ActionResult%** token returns text indicating the success or failure of the immediate past action.
  
-**The //​%ActionResult%//​ token returns text indicating the success or failure of the immediate ​past action.** +If the immediately ​past action ​was successfulthen “OK” is returned, otherwise, a message describing the reason for failure is returned.
-  * **If Successful**Then "**//OK//​**" ​is returned+
-  * Otherwise, a message describing the reason for failure is returned.+
  
 ===== How To Use ===== ===== How To Use =====
  
-Note that this value is reset at the end of every action, so immediately after the Action, you must save the //​%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]].+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 33:
 {{:​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://​forum.keyboardmaestro.com/​search?​q=ActionResult|Keyboard Maestro Forum topics about %ActionResult% token]]
 +==== Keywords ====
 +
 +Action Result, Action Results, Action Failure, Action Success
  
token/ActionResult.1466637629.txt.gz · Last modified: 2016/06/22 19:20 by JMichaelTX