This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
manual:Dictionaries [2021/05/30 01:12] peternlewis [Dictionaries] |
manual:Dictionaries [2021/05/31 03:33] ccstone [AppleScript] |
||
---|---|---|---|
Line 34: | Line 34: | ||
```applescript | ```applescript | ||
tell application "Keyboard Maestro Engine" | tell application "Keyboard Maestro Engine" | ||
- | name of dictionaries | + | set dictionaryNameList to name of dictionaries |
end tell | end tell | ||
``` | ``` | ||
Line 40: | Line 40: | ||
```applescript | ```applescript | ||
tell application "Keyboard Maestro Engine" | tell application "Keyboard Maestro Engine" | ||
- | dictionary keys of dictionary "First Names" | + | |
+ | set newDict to make new dictionary with properties {name:"Shop Prices"} | ||
+ | |||
+ | # If you don't set a key/value pair the newly created dictionary above goes up in smoke. | ||
+ | tell newDict | ||
+ | make new dictionary key with properties {name:"Coffee", value:"3.50"} | ||
+ | end tell | ||
+ | |||
+ | end tell | ||
+ | ``` | ||
+ | |||
+ | ```applescript | ||
+ | tell application "Keyboard Maestro Engine" | ||
+ | set dictKeyList to dictionary keys of dictionary "Shop Prices" | ||
end tell | end tell | ||
``` | ``` | ||
Line 46: | Line 59: | ||
```applescript | ```applescript | ||
tell application "Keyboard Maestro Engine" | tell application "Keyboard Maestro Engine" | ||
- | set value of dictionary key "P" of dictionary "First Names" to "Fred" | + | set value of dictionary key "Coffee" of dictionary "Shop Prices" to "4.50" |
end tell | end tell | ||
``` | ``` |