How Do I Run AppleScript Code in LabVIEW?

Updated Sep 19, 2018

Reported In


  • LabVIEW

Operating System

  • Mac OS X

Issue Details

I want to run some AppleScript code within my LabVIEW VI. How do I do this?


In order to run AppleScript Code, create a string constant that contains the code to run and wire it into the input string input of the Run AppleScript Code VI.

You can also read in AppleScript code from a plaintext file as shown below, by opening the file, reading it out, then executing the code and closing the file. Note: AppleScript .scpt files will not work this way, since they are saved in a binary encoded format.

Additional Information

You cannot open an AppleScript .scpt file, read it, then wire it into the Run AppleScript Code VI. AppleScript .scpt files are saved in an encoded binary format which LabVIEW can't decode. If you save your .scpt file as a text file within Script Editor, it will be saved as a .applescript file. LabVIEW will then be able to read it and execute it.


Not Helpful