User Tools

Site Tools


dictionary:more:valueforkey

Differences

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

Link to this comparison view

Next revision
Previous revision
dictionary:more:valueforkey [2020/04/27 13:39] – created James Sentmandictionary:more:valueforkey [2023/02/13 14:52] (current) – external edit 127.0.0.1
Line 2: Line 2:
  
 The **value for key** verb accepts an AppleScript user record and a text key and will return the value in the record that contains that key. Since user records use hard coded keywords usually there is no built in AppleScript way to get the value out of a record if you don’t know the key at compile time without using this verb. This only works on user created records with text keys and not with records for which the keys are enumerated in the scripting dictionary. The **value for key** verb accepts an AppleScript user record and a text key and will return the value in the record that contains that key. Since user records use hard coded keywords usually there is no built in AppleScript way to get the value out of a record if you don’t know the key at compile time without using this verb. This only works on user created records with text keys and not with records for which the keys are enumerated in the scripting dictionary.
 +
 +====Usage:====
 +**value for key** (the user defined record) **key** the text key name. Both parameters are required.
 +
 +returns the found value or an error if the key is not found.
  
 ====Example:==== ====Example:====
dictionary/more/valueforkey.1587994781.txt.gz · Last modified: 2023/02/13 14:51 (external edit)