property aRec : {a:1, b:"xyz", c:{1, 2, 3}, d:true} -- for example
try
aRec as text
on error errText
set aRecText to space & errText & space
end try
set AppleScript's text item delimiters to {"{"}
set aRecText to (text items 2 thru -1 of aRecText) as text
set AppleScript's text item delimiters to {"}"}
set aRecText to (text items 1 thru -2 of aRecText) as text
set AppleScript's text item delimiters to {":"}
set recNames to (text items of aRecText)
repeat with i from 1 to (-1 + (count items of recNames))
set itemName to (last word of item i of recNames) as text
display dialog the result as text
end repeat
The problem, now, is to get the value of a named record item.
I tried using 'run script ...', but this does not work.
Also, using 'last word of ...' probably won't work in general, but can be fixed.