Python and After Effects Scripting on Windows
Copy link to clipboard
Copied
So I recently stumbled across this:
GitHub - lohriialo/photoshop-scripting-python: Scripting in Photoshop is used to automate a wide var...
As well as this here (somebody else has tried the same thing for AE, but it seems they were unsuccessful):
python - Adobe After Effects COM Object Model ID? - Stack Overflow
So it looks like you can actually do scripting for Photoshop in Python. I tried one of the sample scripts and it worked perfectly.
However, I would also like to be able to do this for After Effects. Unfortunately, it seems that nobody knows what the "com id" is that would go in the place of "Photoshop" in the following:
from win32com.client import Dispatch
app = Dispatch("Photoshop.Application")
I've tried all sorts of things in place of "Photoshop", like "Ae," After Effects," After_Effects," etc, but none of them seem to work. Does anybody know how I can start scripting for After Effects in Python the way it was done in Photoshop?
For reference, I am using After Effects CC 2014.

Copy link to clipboard
Copied
Hi John,
I just shared a script on GitHib which can help you.
GitHub - kingofthebongo/AE_PyJsx: Python to JSX bridge for Adobe After Effects
That's not exactly what you/we are looking for. But it's a way to avoid the problem and use python to manage After Effects. While awaiting a better solution with Com & DOM of course.
Copy link to clipboard
Copied
Thanks for making this script! Im really interested in trying it out, but for some reason Python's winreg dosnt seem to be able to see any of the applications that i can see in my Registry Editor. Any thoughts as to why it wouldnt be able to read the Registry fully?
Copy link to clipboard
Copied
Think I got it working, or at least a little closer!
https://stackoverflow.com/questions/61235839/how-do-i-make-pythons-winreg-see-registries-that-can-be...
Needed to alter the script a little bit to allow it to connect to 64Bit programs in the regestry on line 45
Copy link to clipboard
Copied
Hi ApollosG, could you explain if the registry solution you found helped you getting any closer in using After Effects scripting in Python? Or was it for another purpose? Thank you!

