-
Excellent, Ed. Pointing me to MacScript() was the tip I needed. Found a post elsewhere started by ... you! This seems to work nicely:
[VBA]sPath = "/Users/Shared/Scripts/ttt.pl"
sSwitches = "-mt -L French"
sArgs = "/Users/fred/Documents/foo"
sCmd = "set RetVal1 to do shell script """ & sPath & " " & sSwitches & " " & sArgs & """"
RetVal2 = MacScript(sCmd)[/VBA]
Only problem: If the script has any problems (a bad path, a bad permission), the macro fails with Runtime Error '5', so the error checking in the script itself seems to be bypassed. Should I be intercepting the VBA runtime errors somehow, or do I need to do some prelim. checking of paths and permissions before I call the script?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules