Last active
January 3, 2022 01:24
-
-
Save MarshySwamp/eb36460ae2813b6fc47e2d3fec48deb3 to your computer and use it in GitHub Desktop.
Run a script from another script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// No GUI | |
$.evalFile(File('~/Desktop/myScript.jsx')); | |
$.evalFile(File(app.path.fsName + "/Presets/Scripts/Fit Image.jsx")); | |
// or | |
$.evalFile(File($.fileName).path + '/myScript.jsx') | |
// or | |
// GUI | |
(function () { | |
var selectJSX = File.openDialog("Select a JSX file to open", "Select:*.jsx"); | |
if (selectJSX === null) return; | |
var cleanJSXpath = selectJSX.fsName.toString(); | |
$.evalFile(File(cleanJSXpath)); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment