User Tools

Site Tools


manual:Dictionaries

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
manual:Dictionaries [2021/05/31 07:33] – [AppleScript] ccstonemanual:Dictionaries [2021/10/04 07:24] (current) – [Accessing Dictionary Values] peternlewis
Line 20: Line 20:
 Use the [[action:Set_Dictionary_Value#See_Also|Set Dictionary Value]] action to set a dictionary value. Use the [[action:Set_Dictionary_Value#See_Also|Set Dictionary Value]] action to set a dictionary value.
  
 +{{:manual:set_dictionary_key_example_01.png|}}
 +
 +{{:manual:set_dictionary_key_example_02.png|}}
 +
 +{{:manual:set_dictionary_key_example_03.png|}}
 ===== Accessing Dictionary Values ===== ===== Accessing Dictionary Values =====
  
 You can use the [[token:Dictionary|%Dictionary%]] token to access Dictionary values. You can use the [[token:Dictionary|%Dictionary%]] token to access Dictionary values.
  
-{{:token:dictionary-example.png?nolink&568|}}+{{:manual:dictionary_01.png}} 
 + 
 + 
 +''%Dictionary[Shop Prices,Cake]%'' 
 + 
 +{{:manual:dictionary_02.png}} 
 + 
 +''%Dictionary[Shop Prices,%Variable%local_KeyName%]%'' 
 + 
 +{{:manual:dictionary_03.png}} 
 + 
 +''%Dictionary[%Variable%local‗DictName%,%Variable%local‗KeyName%]%''
  
 You can list the dictionaries with the [[collection:Dictionaries|Dictionaries]] collection, and you can list all the keys within a dictionary with the [[collection:Dictionary_Keys|Dictionary Keys]] collection. You can list the dictionaries with the [[collection:Dictionaries|Dictionaries]] collection, and you can list all the keys within a dictionary with the [[collection:Dictionary_Keys|Dictionary Keys]] collection.
 +
  
 ===== AppleScript ===== ===== AppleScript =====
Line 43: Line 60:
    set newDict to make new dictionary with properties {name:"Shop Prices"}    set newDict to make new dictionary with properties {name:"Shop Prices"}
        
-   # If you don't set a value the newly created dictionary above goes up in smoke.+   # If you don't set a key/value pair the newly created dictionary above goes up in smoke.
    tell newDict    tell newDict
       make new dictionary key with properties {name:"Coffee", value:"3.50"}       make new dictionary key with properties {name:"Coffee", value:"3.50"}
manual/Dictionaries.1622446381.txt.gz · Last modified: by ccstone

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki