$.getenv('Path')
- when you launch Photoshop and and run a script with above code or target Photoshop from Extendscript the first path from all displayed will be to Photoshop
- when you launch Bridge and and run a script with above code or target Bridge from Extendscript the first path from all displayed will be to Bridge
but:
- when you launch Photoshop and then run Bridge from Photoshop manually (File / Browse in Bridge...) or by script were is command to launch Bridge
and you use $.getenv('Path') whatever from Extendscript with targeted Bridge or from the script the first path there will be displayed won't be to Bridge but Photoshop!
- when you launch Bridge and then run Photoshop from Bridge manually (File / Open with Photoshop) or by script were is command to launch Photoshop
and you use $.getenv('Path') whatever from Extendscript with targeted Photoshop or from the script the first path there will be displayed won't be to Photoshop but Bridge!
Well it makes problem! Because no matter you run Photoshop and Bridge or Bridge and Photoshop,
where the second program is ran from your system or from first program it always should gives path of the program you target or run script from.
Scenario:
Some script works in Photoshop/Bridge but then needs information from Bridge/Photoshop.
a) If both programs were launched separately from system (Windows / OS), and then $.getenv('Path') is used all is okey.
b) If only one program was launched from system and second from that program which was lunched first or from the script targeted one program but then calling another $.getenv('Path') end is completely useless!
Is it bug or some specific behaviour? Well some users can open second program from that first or a script will do it. How then chance behaviour of that second program. I mean ho to make it could use $.getenv('Path') like it was launched from system?
For now it seems like first program is kind of parent of that second, like system for programs ran in. I can close by script that second program and use File(<path>).execute() of course to open that second program. Then it will be opened by system.
But it is not a way. If I did that then I had to use a path, which I don't know, so I want to get by $.getenv('Path') which has to tell me path to application I want to open (no matter there is also app.path). It's about finding solution for the problem I'm describing.
So command line and Autohotkey is no an option too, as in their cases I also has to put the path, which I can't know when I don't know were exacactly and what program is installed by someone who uses my script with $.getenv('Path')
Any ideas what can be done in this situation? If there is not then some workaround? and like I asked before is it bug or specific behaviour?