If your JSX file has
on first line in script, then doubleclick on this file can run script in Photoshop (by default).
Doubleclick could be replaced with runing JSX filem from command line. No arguments required.
Thanks for your reply.
But the code is embedded in a website and the user does not have access to the Desktop, so your proposed solution cannot work
If PS and JSX are both server-side then it should work.
You could run "c:\your\path\action.jsx" from C# .NET
Yes thanks, both files/applications are server side.
as .JSX is Extended version.
I mean like this: .net - Run an exe from C# code - Stack Overflow But you will run jsx instead exe.
If you have properly set #target in jsx.
JSX has nothing todo with <script></script> in HTML. (except panels inside Photoshop)
Thanks for link to Stack Flow .Net C# code
However this code (adjusted for actual file names ) creates error as follows;
Win 32 Exception was Caught
The specified executable is not a valid application for this OS platform.
Add Reference from COM object for Photoshop
Add to top of Code page;
Code required is;
string cFile = HttpContext.Current.Server.MapPath("~/Test Action.jsx");
Photoshop.ApplicationClass app = new Photoshop.ApplicationClass();
string aArguments= new string; // as no Parameters
Thanks for contributions.
Hope this solution helps, somebody else.