User Tools

Site Tools


manual:Variables

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
Last revision Both sides next revision
manual:Variables [2021/10/04 01:19]
peternlewis [Deleting Variables]
manual:Variables [2023/09/29 04:19]
peternlewis [Scope]
Line 28: Line 28:
 Macros can create or read existing variables, which persist and are permanently stored (except Local and Instance variables which are transient, and Password variables which are never saved to disk). Macros can create or read existing variables, which persist and are permanently stored (except Local and Instance variables which are transient, and Password variables which are never saved to disk).
  
-Variables contain only plain, un-styled, text and may be used in any token text field in an action, as well as in [[Calculations]] in a numerical field.  Variable may be used in [[Calculations]] ​if they contain a valid number or expression.+Variables contain only plain, un-styled, text and may be used in any token text field in an action, as well as in [[Calculations]] in a numerical field if they contain a valid number or expression.
  
  
Line 40: Line 40:
 ==== Password Variables ==== ==== Password Variables ====
  
-Variables with names that start or end with “Password” or “PW” are considered passwords – their values will not be stored (except in memory) and they cannot be read directly by shell scripts or AppleScripts,​ though their consequences can easily be extracted, eg with the Set Clipboard to Text action, so you should clear them as soon as they have served their purpose. ​ The Prompt For User Input dialog will display such variables concealed in a password field.+Variables with names that start or end with “Password” or “PW” are considered passwords – their values will not be stored (except in memory) and they cannot be read directly by shell scripts, JavaScripts ​or AppleScripts,​ though their consequences can easily be extracted, eg with the Set Clipboard to Text action, so you should clear them as soon as they have served their purpose. ​ The Prompt For User Input dialog will display such variables concealed in a password field.
  
 ==== Instance Variables ==== ==== Instance Variables ====
Line 166: Line 166:
  
  
-It may be a good idea to set a Variable to `""​` ​do if you no longer need it, or if it contains sensitive information (like a password) or a large value (like a file or web page contents).+It may be a good idea to set a Variable to `""​` if you no longer need it, or if it contains sensitive information (like a password) or a large value (like a file or web page contents).
  
 Perhaps the best way to avoid variable clutter and eliminate sensitive and/or large values is to use either //Local// or //​Instance//​ Variables when you do not need the Variable after completion of the Macro in which the Variable is used. Perhaps the best way to avoid variable clutter and eliminate sensitive and/or large values is to use either //Local// or //​Instance//​ Variables when you do not need the Variable after completion of the Macro in which the Variable is used.
Line 178: Line 178:
 ===== View Your Entire List of Variables ===== ===== View Your Entire List of Variables =====
  
-You can add, delete, see or change global variables in the [[Windows#​Preferences_Variables_Pane|Variables preference pane]] that have been created by your macros and scripts.  There are no variable preferences to be set here.  This is sometimes called the "​Variables Panel" or "​Variables Tab" in Keyboard Maestro Preferences.+You can add, delete, see or change global variables in the [[Windows#​Preferences_Variables_Pane|Variables preference pane]] that have been created by your macros and scripts.
  
 Local and Instance Variables are _not_ accessible from either the Preferences Window. Local and Instance Variables are _not_ accessible from either the Preferences Window.
manual/Variables.txt · Last modified: 2023/09/29 04:44 by peternlewis