Hi
You can use BridgeTalk to communicate between apps
In this case, there is the code and you should run it from Bridge to get the information you need from photoshop:
// run this from Bridge to get the path of the active document
// if photoshop is not running, it gives that message
// if photoshop is Busy, it gives that warning
// if photoshop has any images opened, it avoids getting the path and warn you
pathFromPS();
function pathFromPS() {
var bt = new BridgeTalk;
bt.target = "photoshop";
bt.body = '(app.documents.length > 0) ? app.activeDocument.path : "No active images";';
bt.onResult = function (resObj) {
activePath = resObj.body;
}
if (BridgeTalk.getStatus (bt.target) == 'IDLE') {
bt.send(3);
} else {
activePath = (BridgeTalk.isRunning(bt.target)) ? "[Busy]" : "[Not Running]";
}
return activePath;
}