Wiki Update: AppleScript and Scripting Pages

Looks good!

Please revivew these scripts carefully to make sure I didn't introduce any errors.


Not errors, but some observations:

Variable quoting

In the examples @ Scripting → GET/SET Using Ver 7.1+ you have used the quoted form for the KM variables:

set calcResult to getvariable "Calculation Result"
…
setvariable "Calculation Result" to (calcResult + 10)

I think this is a good idea since KM variables can include Spaces.

For more consistency I would do the same in the snippets @ AppleScript → Get and Set Variables, where currently you are using the unquoted forms.

Variable naming

Also in the snippets @ AppleScript → Get and Set Variables, I find it a bit confusing that every variable has a “kmVar” in its name:

set kmVarValue to getvariable kmVarName
…
setvariable kmVarName to kmVarValue

To make it clearer which variable belongs to AppleScript and which variable belongs to KM, I would do something like this:

set myASVar to getvariable myKMVar
…
setvariable myKMVar to myASVar

that is, in conjunction with the aforementioned consistent use of quoted forms:

set myASVar to getvariable "my KM Var"
…
setvariable "my KM Var" to myASVar


Just my 2¢