Hi,
I try to bring Photoshop to the front. The whole action is triggered by a client (in this case a browser) which posts a messages via STOMP to the UXP script in Photoshop.
Photoshop’s UXP gets the message and displays a dialog with showModal. Unfortunately under Windows this doesn’t bring Photoshop to the front (under macOS it works) but let the Photoshop application blink in Windows’ task bar. That’s why I tried to call application bringToFront:
async triggerBringToFront() {
await require("photoshop").core.executeAsModal(myBringToFrontFunction, {"commandName": "Bring PS to front"});
}
async myBringToFrontFunction(executionContext, descriptor) {
try {
const app = require('photoshop').app;
await app.bringToFront();
} catch (e) {
logger.errorLog('Failed: ', e);
}
}
The code doesn’t throw an error but it also does not work. What am I doing wrong. Or is bringToFront the wrong function?
Best regards
Lars
.