メインコンテンツまでスキップ
バージョン:25.2

doAppleScript

  • command, function
  • The doAppleScript command (and function) executes a text string as AppleScript code. Use this along with the merge function to insert values into the AppleScript. For example, the following will count the number of words in a Microsoft Word document whose name is in the local variable wordDocName:

        put doAppleScript of merge of {{

             tell application "Microsoft Word"
open "[[wordDocName]]"
count words in window 1
end tell
}}

    This can also be called as a command using any of these formats:

        do AppleScript aScript

         do aScript as AppleScript

        doAppleScript aScript

  • Related: do