Atom text editor for after effects scripting
Moderator: Paul Tuersley
-
- Posts: 4
- Joined: October 3rd, 2017, 5:02 am
Hey everyone. I am hitting my head against a wall here for quite some time. I tried to use atom for editing my scripts but it is very hard to constantly copy and paste my code into extendscript to run it. Does anyone know what settings must be done to atom to make it run Affter Effects scripts? I know it is possible because i heared Zack telling this in his interview for School of Motion.
This Zack doesn't use Atom, and never has.
I used to use Sublime Text 3 with a heavily modified version of Sebastian Lavoie's "Extendscript" package to easily execute scripts directly in AE. His version would copy scripts to specific folders and I found this unnecessary, so modified it to be more modular and execute scripts directly. You can find this here: https://github.com/seblavoie/sublime-extendscript -- but I don't recommend this method anymore.
For general reference, "Extendscript" is the name of the programming language; "Extendscript Toolkit" is the IDE that Adobe supplies, but you really don't need to put any code in there in order to run it!
Better options:
- Write your code anywhere you want, then in AE run the script directly via `File > Scripts > Run Script File...` and choose your script. Simple and easy. In recent versions of AE, there is a shortcut to run the last-executed script, so once you manually specify it once you can just hit the shortcut to re-run the new version.
- Use a script launcher like http://aescripts.com/kbar with a button linked to the latest script file, so you can quickly just press the button to run the latest version of your script
- If you really want to use Extendscript Toolkit for some reason, just open the exact same script file in Extendscript Toolkit, and then every time you finish writing your code in Atom, and enable the ESTK preference to auto-reload the saved file. Then, every time you switch back to ESTK, it'll show the latest state of your script file. Then you can press 'run' in ESTK, and it'll be up-to-date with what you wrote in Atom.
I used to use Sublime Text 3 with a heavily modified version of Sebastian Lavoie's "Extendscript" package to easily execute scripts directly in AE. His version would copy scripts to specific folders and I found this unnecessary, so modified it to be more modular and execute scripts directly. You can find this here: https://github.com/seblavoie/sublime-extendscript -- but I don't recommend this method anymore.
For general reference, "Extendscript" is the name of the programming language; "Extendscript Toolkit" is the IDE that Adobe supplies, but you really don't need to put any code in there in order to run it!
Better options:
- Write your code anywhere you want, then in AE run the script directly via `File > Scripts > Run Script File...` and choose your script. Simple and easy. In recent versions of AE, there is a shortcut to run the last-executed script, so once you manually specify it once you can just hit the shortcut to re-run the new version.
- Use a script launcher like http://aescripts.com/kbar with a button linked to the latest script file, so you can quickly just press the button to run the latest version of your script
- If you really want to use Extendscript Toolkit for some reason, just open the exact same script file in Extendscript Toolkit, and then every time you finish writing your code in Atom, and enable the ESTK preference to auto-reload the saved file. Then, every time you switch back to ESTK, it'll show the latest state of your script file. Then you can press 'run' in ESTK, and it'll be up-to-date with what you wrote in Atom.
install "Process-Palette" package in Atom then add a global configuration by "Do it". in shell Command use one of the following commands:
Windows:
"C:\Program Files\Adobe Adobe After Effects version\Support Files\afterfx.exe" -r {fileAbsPath}
Mac:
osascript -e 'tell application "Adobe After Effects version" to activate' -e 'tell application "Adobe After Effects version" to DoScriptFile "{fileAbsPath}"'
ex: version = CC 2015
Windows:
"C:\Program Files\Adobe Adobe After Effects version\Support Files\afterfx.exe" -r {fileAbsPath}
Mac:
osascript -e 'tell application "Adobe After Effects version" to activate' -e 'tell application "Adobe After Effects version" to DoScriptFile "{fileAbsPath}"'
ex: version = CC 2015
If you don't using a new text editor you could use visual studio code (vs code). It's a text editor that a lot of programmers use and I like it a lot better than the extendscript editor. VS code has a extendscript plugin that will allow you to execute the script in vs code to After Effects. The text editor is also free.
For Expression Tutorials:
https://www.youtube.com/c/CodingAfterEffects
https://www.youtube.com/c/CodingAfterEffects
-
- Posts: 2
- Joined: April 7th, 2018, 10:34 am
You can do this using a package called "Process Pallet" which runs shell commands.
On Mac you add this command:
(or whatever version of AE you have)
On Mac you add this command:
Code: Select all
osascript -e 'tell application "Adobe After Effects CC 2017" to activate' -e 'tell application "Adobe After Effects CC 2017" to DoScriptFile "{fileAbsPath}"'
I use Visual Studio Code, and have a writeup here: http://zacklovatt.com/visual-studio-code-stuff/
Also, Extendscript Toolkit is being EOL'd in favour of a VS Code plugin: https://medium.com/adobetech/extendscri ... 2e1a068e89 -- this will be the only officially supported way to work with a host app from a coding environment.
Also, Extendscript Toolkit is being EOL'd in favour of a VS Code plugin: https://medium.com/adobetech/extendscri ... 2e1a068e89 -- this will be the only officially supported way to work with a host app from a coding environment.
- RayRainier
- Posts: 4
- Joined: August 16th, 2019, 10:53 am
- Contact:
Hi Guys!
I ussualy use Atom for scripting and ExtendScropt ToolKit to debbug. I also use a little script I wrote to execute the current script I'm working on, so I can save in Atom, switch to AE
(alt+tab) and just press that custom button.
I heard about an addon for Atom that load a button to execute the script like ESTK but I haven't give it a try.
I ussualy use Atom for scripting and ExtendScropt ToolKit to debbug. I also use a little script I wrote to execute the current script I'm working on, so I can save in Atom, switch to AE
(alt+tab) and just press that custom button.
I heard about an addon for Atom that load a button to execute the script like ESTK but I haven't give it a try.
Thats cool Ray I didn't know about that.
Would be very interested to hear everyones thoughts on this... MoCode. Released in the last few days.
https://www.youtube.com/watch?v=zqItYMYX10s
Looks promising. I wonder if its a replacement of VSC or just one to lauch the odd script in.
https://aescripts.com/mocode/
Extensions seem to really be taking off more and more now!
Cheers
Liam
Would be very interested to hear everyones thoughts on this... MoCode. Released in the last few days.
https://www.youtube.com/watch?v=zqItYMYX10s
Looks promising. I wonder if its a replacement of VSC or just one to lauch the odd script in.
https://aescripts.com/mocode/
Extensions seem to really be taking off more and more now!
Cheers
Liam