I’m trying to write a simple app in AS Studio that interfaces with a command line tool for Centrify Direct Control and Active Directory. My app has simply 4 text fields where the user fills out a username, password, an old computer name and a new computer name (it’s used in renaming a computer in the domain). I have a very small perl script that needs to be called in the AS with a parameter that’s from one of the text fields.
I have added the perl script (script.pl) to the project (with the Add>Existing Files… action in the project window) and it shows up in the scripts folder group with the AS itself. I chose to keep the reference type as “Default”.
I want to call this script with a “do shell script” command in my AS, but every time I try it out, I get an AS error that says the perl script can’t be found. It’s in the application package in the Resources folder after my app is built. Does anyone know how to access an external script file in this way? I tried simply:
do shell script "usr/bin/perl script.pl " & textField1
do shell script "usr/bin/perl …/script.pl " & textField1 (thinking that the script.pl is simply in the root of Resources and the AS is in Resources/Scripts).
Both of these produce errors where script.pl cannot be found.
Thanks in advance!