So, I'm writing a python script that gets data from a google sheet and returns it back to an ExtendScript script that I'm writing for After Effects.
The relevant bits are :
getSpreadsheetData.py
def main():
values = getSpreadsheetRange("1M337m3YHCdCDcVyS4fITvAGJsw7rGQ2XGbZaKIdkJPc", "A1:Q41")
return processValues(values)
afterEffectsScript.jsx
var script_file = File("getSpreadsheetData.py");
var results = script_file.execute();
$.writeln(results);
alert("done!");
So, I have three questions :
How do I pass variables from the
afterEffectsScript.jsx
to the python script (for example the spreadsheet id and range)?How do I get a return from the python script and return it back to the
jsx
file?How do I make my
afterEffectsScript
to work async so that it can wait for the python script to get what it needs...
Thanks in advance for the advice!
-P