Page 1 of 1

Pass a variable through the command line or terminal?

Posted: February 15th, 2007, 2:01 pm
by byronnash
I'm working on a script to have photoshop trigger and after effects script. I understand how to start AE using the command line or terminal through scripting. I need to pass one piece of data from PS to AE and I'm trying to figure out how to do it. It would be nice to not have to package my entire AE script into a batch file to run with "afterfx.exe -s". That's the only way I can think of to get access to send a variable into AE or write a pref file.

Did I just confuse everything?

passing data to AE

Posted: February 15th, 2007, 10:00 pm
by redefinery
Hi Byron,

I'm not aware of a way to pass data on the command line. I would just save the data to a file from Photoshop, and then read the data from the After Effects script. ...unless I'm misunderstanding what you're trying to do.

Jeff

Posted: February 16th, 2007, 6:11 am
by byronnash
I have a data file that photoshop is reading from and adding data to. The only variable that after effects needed was the folder location of that data file. What I decided to do is write another data file to "~/tempData.txt" so that the file always goes to the same place(desktop or home dir) and then have AE delete the file after it gets the info from it.

Posted: February 16th, 2007, 7:08 am
by byronnash
If I put this line in a .sh file, will it run properly assuming the path is correct?

Code: Select all

/Applications/Adobe After Effects 7.0/AfterFX -s "alert('hello')"
I don't have a Mac to test this stuff on right now. Also, what is the difference between .sh and .term? I'm going to be writing the batch file from photoshop to trigger an after effects script. It needs to work for both mac and pc.