User Tools

Site Tools


action:While

Differences

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

Link to this comparison view

Next revision
Previous revision
action:While [2015/07/09 00:17] – created mirazjordanaction:While [2021/10/14 04:33] (current) peternlewis
Line 1: Line 1:
-The While action executes a list of actions while conditions are met.+====== While Conditions Are Met Action ======
  
-{{:action:while.png|}}+This _Action_ repeats a group of [[:Actions|Actions]] while the [[:Conditions|Conditions]] in the _While_ criteria are met.  As soon as the _While_ Criteria is _not_ met, the _Action_ will exit the loop.
  
-Drag one or more actions into the //No Action// area.+It is one of several Actions that _loop_ through a set of other Actions until some criteria is met.
  
-Select a way to meet the conditions:+**The _While_ Criteria can be any of these:**
   *Any of the following are true — at least one condition must be true.   *Any of the following are true — at least one condition must be true.
   *All of the following are true — every condition must be true.   *All of the following are true — every condition must be true.
Line 11: Line 11:
   *Not all of the following are true — at least one condition must be false.   *Not all of the following are true — at least one condition must be false.
  
-Add a new condition by clicking the green + button beside //New Condition// to select from a list of available conditions.+**The _Condition_ can be any from the [[:Conditions|Conditions]] collection.**  See [[#Conditions|below for details]].
  
-Conditions are grouped by categorySee the Conditions section for further details+**When you insert this _Action_ it appears like this:**\\ 
-  *Application +{{:action:while-conditions-action-km-7.3.png?nolink|}} 
-  *Button + 
-  *Calculation +===== How To Setup ===== 
-  *Clipboard + 
-  *Environment Variable +  - Select one _While Criteria_ from the _While_ popup list.\\ (default is _all of the following is true_). 
-  *Found Image +  - Add one or more new conditions by clicking the green + button next to the //New Condition// to see a popup menu of [[:Conditions|Conditions]]. 
-  *Key +    - Select one of these _Conditions_ and enter additional details as needed. 
-  *Location +  - Insert one or more [[:Actions|Actions]] into the //No Action// area. 
-  *Macro/Macro Group + 
-  *Menu +===== Exiting the While Loop ===== 
-  *Modifiers + 
-  *Mounted Volume +  * The _Actions_ in the _While_ loop (set of actions) will start *if* all criteria and conditions are met when the _Action_ is executed in the Macro processing. 
-  *Path +  * As soon as the _While_ Criteria is _not_ met, the _Action_ will exit the loop, and the next _Action_ (if any) in the Macro will be processed. 
-  *Pixel +  * You can explicitly exit the loop by using the [[action:Break_From_Loop|Break From Loop]] _Action_. 
-  *Script +  * For example, in the example _Action_ shown below, the _While_ loop will exit\\ **IF EITHER**\\ 
-  *Text + 1. Finder is NOT frontmost\\ 
-  *Typed String +**OR**\\ 
-  *USB Device +2. The Keys ⌘⇧ are pressed\\ 
-  *Variable +**THEN the loop will exit.** 
-  *Any Window + 
-  *Front Window +You can break out of the loop, retry this iteration, or skip to the next iteration with the [[actions:Redirect_Control_Flow|actions:Redirect Control Flow]] actions. 
-  *Wireless Network+ 
 +===== Example ===== 
 + 
 +{{:action:while.png?500|}} 
 + 
 +===== Conditions ===== 
 + 
 +See the [[:Conditions|Conditions]] section for further details. 
 + 
 +~~NOCACHE~~ 
 +<nspages condition -textPages="">
  
 After selecting a condition category you can make further choices. For example, if you choose the //Application Condition// you can choose a specific application to be running, or at the front, and so on. After selecting a condition category you can make further choices. For example, if you choose the //Application Condition// you can choose a specific application to be running, or at the front, and so on.
  
 Add further conditions by clicking the green + button again. Add further conditions by clicking the green + button again.
 +
 +You can break out of the loop, retry this iteration, or skip to the next iteration with the [[actions:Redirect_Control_Flow|actions:Redirect Control Flow]] actions.
 +
 +===== See Also =====
 +
 +=== Actions ===
 +
 +* [[action:If Then Else|If Then Else]] action
 +* [[action:Pause_Until|Pause Until]] action
 +* [[action:For_Each|For Each]] action
 +* [[action:Repeat|Repeat]] action
 +* [[action:Until|Until]] action
 +* [[action:Assert|Assert]] action
 +* [[actions:Redirect_Control_Flow|Redirect Control Flow]] actions
 +* [[:Actions|See all Actions]]
 +
 +===  Conditions ===
 +
 +* [[:Conditions|See all Conditions]]
 +==== Forum ====
 +
 +- [[https://forum.keyboardmaestro.com/t/issue-pause-until-action-fails-with-no-windows/3022/7|ISSUE: PAUSE UNTIL Action Fails with No Windows]]
 +
 +- [[https://forum.keyboardmaestro.com/search?q=Until|Keyboard Maestro Forum topics about Until action]]
  
action/While.1436401038.txt.gz · Last modified: by mirazjordan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki