Quantcast
Channel: Adobe Community : Unanswered Discussions - After Effects
Viewing all articles
Browse latest Browse all 30854

system.callSystem and osascript

$
0
0

Hi guys,

 

I'm trying to write a function that will run some AppleScript to load a newly created script into After Effects.  I've tried a couple of ways of doing it...straight AppleScript, AppleScript file...but can't seem to figure it out.  I'm a little unsure about the relationship between system.callSystem and the use of the osascript command.

 

Here is the closest I've gotten it to working...functionality builds the osascript call:

 

osascript -e 'tell application "Adobe After Effects CS6"' -e 'activate' -e 'DoScriptFile "pathToFile"' -e 'end tell'

 

I've also tried putting the AppleScript into a file and running the file via osascript:

 

osascript script.scpt

 

When I run both commands directly in Terminal, they work.  However, when I run them within system.callSystem...I get the mac "thinking" wristwatch and after about 20-30 seconds, After Effects comes back without having run the command properly. 

 

The return value from system.callSystem is "script.scpt: execution error: Adobe After Effects CS6 got an error: AppleEvent timed out. (-1712)"

 

Do I need to wrap the osascript calls within a "tell application "Terminal"..." block?  How should I go about doing that? Any thoughts on how to run AppleScript functionality from with an AE script?

 

Another thought I had was that I wasn't properly escaping spaces and double quotes but I would assume if that were the case the error wouldn't be about timing out.

 

Any help is greatly appreciated!


Viewing all articles
Browse latest Browse all 30854

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>