The DO_APPLE_SCRIPT procedure compiles and executes an AppleScript script, possibly returning a result. DO_APPLE_SCRIPT is only available in IDL for Macintosh .
Suppose you wish to retrieve a range of cell data from a Microsoft Excel spreadsheet. The following AppleScript script and command retrieve the first through fifth rows of the first two columns of a spreadsheet titled "Worksheet 1", storing the result in the IDL variable A:
script = [ 'tell application "Microsoft Excel"', $
'get Value of Range "R1C1:R5C2" of Worksheet 1', $
DO_APPLE_SCRIPT, script, RESULT = a
Similarly, the following lines would copy the contents of the IDL variable A to a range within the spreadsheet:
script = [ 'tell application "IDL" to copy variable "A"', $
'tell application "Excel" to copy aVariable to', $