Login About Gallery
Memory by Wonky Logic
COMMENT
‎This shortcut is a plug in; you call it from another Shortcut. To call it use the Run Shortcut action from the other Shortcut. Before the Run Shortcut action set up a dictionary that gets passed into Run Shortcut. The dictionary then becomes the input for this Shortcut. The dictionary has three key-value pairs: - "variable name" | a string value. - "method" | a string specifying if the variable is being added to memory "add" or being retrieved "get". - "payload" | a string, number or dictionary - the data being stored for this variable. If getting a stored variable the payload value is returned. If adding a variable to store the variable payload is added to the master dictionary using variable name as the key and the master dictionary is stored in the reminder note.
SCRIPTING
‎Get dictionary from ‎Shortcut Input
SCRIPTING
‎Get ‎Value ‎for ‎method ‎in ‎Dictionary
DOCUMENTS
‎Get text from ‎Dictionary Value
VARIABLES
‎Set variable ‎Method ‎to ‎Text
SCRIPTING
‎Get ‎Value ‎for ‎variable name ‎in ‎Dictionary
VARIABLES
‎Set variable ‎Variable name ‎to ‎Dictionary Value
SCRIPTING
‎Get ‎Value ‎for ‎payload ‎in ‎Dictionary
VARIABLES
‎Set variable ‎Variable payload ‎to ‎Dictionary Value
TEXT
‎Shortcut Variables
VARIABLES
‎Set variable ‎Variable storage name ‎to ‎Text
COMMENT
‎Retrieve the stored variable
REMINDERS
‎Find ‎All Reminders ‎where
‎All the following are true
‎[{'class': 'filter-property', 'value': 'List'}, {'class': 'filter-operator', 'value': 'is'}, {'class': 'filter-benchmark', 'value': 'Reference'}]
‎[{'class': 'filter-property', 'value': 'Title'}, {'class': 'filter-operator', 'value': 'contains'}, {'class': 'filter-benchmark inline', 'value': [{'class': 'magic', 'value': 'Variable storage name', 'glyph': 'assets/cat/Variable.svg', 'UUID': ''}]}]
Sort by
‎None
Limit
Get 1 File
SCRIPTING
‎If ‎Reminders ‎does not have any value
COMMENT
‎Reminder not set up, set up with this var and placeholder dict
DICTIONARY
DICTIONARY
VARIABLES
‎Set variable ‎Variable storage dict ‎to ‎Dictionary
REMINDERS
‎Add ‎Variable storage name ‎to ‎Reference ‎with ‎No Alert
‎Options Under Construction
SCRIPTING
‎Otherwise
VARIABLES
‎Get ‎Reminders
SCRIPTING
‎End If
VARIABLES
‎Set variable ‎Variable storage reminder ‎to ‎If Result
REMINDERS
‎Get ‎Notes ‎from ‎Variable storage reminder
SCRIPTING
‎Get dictionary from ‎Notes
VARIABLES
‎Set variable ‎Variable storage dict ‎to ‎Dictionary
SCRIPTING
‎If ‎Method ‎contains ‎add
COMMENT
‎Add incoming payload to dictionary as “payload”
SCRIPTING
‎Get ‎Value ‎for ‎Variable name ‎in ‎Variable storage dict
VARIABLES
‎Set variable ‎Variable Dict ‎to ‎Variable Dict
DOCUMENTS
‎Get text from ‎Variable Dict
SCRIPTING
‎Count ‎Items ‎in ‎Text
SCRIPTING
‎If ‎Count ‎is greater than ‎0
COMMENT
‎Count > 0 so Dict exists
SCRIPTING
‎Get dictionary from ‎Variable Dict
SCRIPTING
‎Set ‎payload ‎to ‎Variable payload ‎in ‎Dictionary
SCRIPTING
‎Get dictionary from ‎Variable storage dict
SCRIPTING
‎Set ‎Variable name ‎to ‎Dictionary ‎in ‎Dictionary
VARIABLES
‎Set variable ‎Variable storage dict ‎to ‎Dictionary
SCRIPTING
‎Otherwise
COMMENT
‎Count = 0 so Dict doesnt exist ⇒ initialise it
DICTIONARY
VARIABLES
‎Set variable ‎Variable Dict ‎to ‎Dictionary
COMMENT
‎Since this Dict did not exist check for presence of the master Dict
DOCUMENTS
‎Get text from ‎Variable storage dict
SCRIPTING
‎Count ‎Items ‎in ‎Text
SCRIPTING
‎If ‎Count ‎is greater than ‎0
SCRIPTING
‎Get dictionary from ‎Variable storage dict
SCRIPTING
‎Set ‎Variable name ‎to ‎Variable Dict ‎in ‎Dictionary
VARIABLES
‎Set variable ‎Variable storage dict ‎to ‎Dictionary
SCRIPTING
‎Otherwise
DICTIONARY
VARIABLES
‎Set variable ‎Variable storage dict ‎to ‎Dictionary
SCRIPTING
‎End If
SCRIPTING
‎End If
COMMENT
‎Store master dictionary back to reminder
MISSING
‎setters.reminders Under Construction
SCRIPTING
‎Otherwise
COMMENT
‎Retrieve the payload and return it
SCRIPTING
‎Get ‎Value ‎for ‎Variable name ‎in ‎Variable storage dict
SCRIPTING
‎Get ‎Value ‎for ‎payload ‎in ‎Variable Dict
SCRIPTING
‎End If

Showcuts

Magic Vars

Screenshot

Submitted Anonymously 2 years ago

Visit iCloud (iOS)

Copy iCloud Link

Scan QR Code

0