This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
manual:Variables [2021/08/26 03:11] peternlewis [Instance Variables (v8+)] |
manual:Variables [2021/10/04 01:08] peternlewis |
||
---|---|---|---|
Line 21: | Line 21: | ||
^ Scope ^ Availability ^ | ^ Scope ^ Availability ^ | ||
- | | **Global**, Permanent variables | • Accessible basically everywhere, including Scripts.\\ • You can also see and edit variables in the Preferences.\\ • You can see global variables in the [[Windows#Value_Inspector_Window |Value Inspector]]. | | + | | **Global**, permanent variables | • Accessible basically everywhere, including Scripts.\\ • You can also see and edit variables in the Preferences.\\ • You can see global variables in the [[Windows#Value_Inspector_Window |Value Inspector]]. | |
- | | **Password**, Semi-permanent variables | • Available to macros but not displayed.\\ • Not directly accessible via AppleScript.\\ • Concealed in password fields in Prompt For User Input actions.\\ • Not saved to disk. | | + | | **Password**, semi-permanent variables | • Name must begin or end with “PW” or “password” (case insensitive).\\ • Available to macros but not displayed.\\ • Not directly accessible via AppleScript.\\ • Concealed in password fields in Prompt For User Input actions.\\ • Not saved to disk. | |
- | | **[[#Instance_Variables_v8|Instance]]** Variables (v8+)\\ Auto-deleted when Macro terminates | • Name must begin with "instance" (case insensitive).\\ • Restricted to a specific execution sequence.\\ • Available to the Macro where it was created and Sub-Macros of that Macro, for a given execution instance of the main macro.\\ • These Variables are private to each execution of the same Macro, even when running simultaneously.\\ • Accessible by [[action:Prompt_for_User_Input|Prompt For User Input]]\\ • As of v8.0.3, is accessible by scripts (when used in an Execute Script Action).\\ • Accessible by [[action:Custom_HTML_Prompt|Custom HTML Prompt]] (v8.0.3+).\\ • Accessible by AppleScript with the instance specifier. | | + | | **[[#Instance_Variables|Instance Variables]]**, local to a specific macro execution instance | • Name must begin with “instance” (case insensitive).\\ • Restricted to a specific execution sequence.\\ • Available to the Macro where it was created and Sub-Macros of that Macro, for a given execution instance of the main macro.\\ • These variables are private to each execution of the same Macro, even when running simultaneously.\\ • Accessible by [[action:Prompt_for_User_Input|Prompt For User Input]]\\ • Accessible by scripts (when used in an Execute Script Action).\\ • Accessible by [[action:Custom_HTML_Prompt|Custom HTML Prompt]].\\ • Accessible by AppleScript with the `instance` specifier. | |
- | | **[[#Local_Variables_v8|Local]]** Variables (v8+)\\ Auto-deleted when Macro terminates | • Name must begin with "local" (case insensitive)\\ • Restricted to the specific Macro it is in.\\ • //Not// available to any of its Sub-Macros\\ • Same accessibility as Instance Variables. | | + | | **[[#Local_Variables|Local Variables ]]**, local to a specific macro | • Name must begin with "local" (case insensitive)\\ • Restricted to the specific Macro it is in.\\ • //Not// available to any of its Sub-Macros\\ • Same accessibility as Instance Variables. | |
- | | **[[manual:Dictionaries|Dictionary]]**, Permanent, global in scope. | • Accessible basically Everywhere, including Scripts.\\ • Dictionaries consist of the //Dictionary Name//, One or more pairs of //Key Name//, and //Value//.\\ • Although Dictionaries are sort of like structured //Variables//, they are kept in a separate category called //[[manual:Dictionaries|Dictionaries]]//. | | + | |
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). |