Copy link to clipboard
Copied
I im making simple plugin with buttons which can run photoshop actions, (removeBgBtn) works correct but two another button wont run, there is no error in logs. I have folder scripts and inside I have two jsx scripts. They works correct when I use classic action panel.
Copy link to clipboard
Copied
Unfortunately Adobe is limiting the use of jsx, Keep in mind that to use jsx you have to set the manifest 4 and remove api 2. You could do it like this; Create an action that calls the jsx file, Then create another action that calls the previously created action. Create a button in the uxp panel that calls the action and it should work. That said, keep in mind that Adobe should soon stop supporting jsx, so I would go straight to uxp.
Copy link to clipboard
Copied
So soon actions in JSX will stop working? Wtf? I have most important automatisation scripts there 😮
Copy link to clipboard
Copied
I tried to advise you,
but know that adobe has been thinking for a long time about removing jsx from photoshop,
so all cep and jsx panels will no longer be supported.
there is no certain date, but this is what he said to do.
my advice is to use the effort to convert your jsx scripts to uxp.
Copy link to clipboard
Copied
it would be a huge problem probably for a lot of people, I don't understand what's bothering them. Unless they have a better solution to create automation in photoshop in a simple way.
Copy link to clipboard
Copied
In fact the solution is uxp. As I told you there is no specific date, So it can be in 1 month, 6 months 1 year or even more.
Copy link to clipboard
Copied
I found this script that calls a jsx file by inserting the file path
/**
* @File Execute ExtendScript from UXP Script
* https://forums.creativeclouddeveloper.com/t/how-to-call-a-jsx-file-from-a-psjs-file/
* https://community.adobe.com/t5/photoshop-ecosystem-discussions/how-to-call-a-jsx-file-from-a-psjs-file/td-p/15193966
* @Version 1.0.0
* @author sttk3.com
*/
const { localFileSystem } = require('uxp').storage ;
const { app, core, action } = require('photoshop') ;
const jsxFile = await localFileSystem.getEntryWithUrl('/Users/username/Desktop/alert.jsx') ;
const token = await localFileSystem.createSessionToken(jsxFile) ;
try {
await core.executeAsModal(async () =>
{
await action.batchPlay(
[
{
_obj: 'AdobeScriptAutomation Scripts',
javascript: {
_kind: 'local',
_path: token
},
}
],
{}
) ;
},
{
commandName: 'ExtendScript',
interactive: true,
}
) ;
} catch(e) {
await app.showAlert(e) ;
}