|
#1
| ||||
| ||||
| AppleScript records and Tell statements I'm trying to create a custom record in a script, and then access its properties in a Tell statement. Like this: Code: set y to {high:14, low:13, permutations:12} as record
tell y
return count
end tell I can access the properties by saying "the high of y", but I can't use the simplified form in the tell block. The problem is that AppleScript sees "high" as the name of an undefined variable, not as a property name. Is there any way I can make this work? Can I specify custom script-wide keywords somehow? If necessary, of course, I can just use the lengthy form. But it's a bit of a hassle, because in this case writability is very important, as the script takes user-made statements. It'd be nice if I could just execute those statements, but if I can't get the tell block working, I'll have to run some text filters on them first. |
|
#2
| |||
| |||
| Code: set y to {high:14, low:13, permutations:12} as record
tell y
return high of y
end tell |
|
#3
| ||||
| ||||
| Quote:
This should work, but doesn't: Code: tell y return high end tell Code: tell application "Finder" set x to the properties of file 1 end tell tell x return kind end tell |