Quick question on Javascript and Photoshop/illustrator UI please

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

Hellen-arndt89
Posts: 5
Joined: Mon Dec 21, 2020 10:53 pm

Quick question on Javascript and Photoshop/illustrator UI please

Post by Hellen-arndt89 »

I am currently learning JS to better controll and automate Photshop and Illustrator.
I wanted ask a question in perticular about the unique UI framework that both programs use.

I know with scriting you can do just about anything you can do through the UI. Does that include control of the Panels?

For example through JS code, could I have the swatches panel open where the mouse coordinates are? not where it was at when it was last open. just like the right click function when brush tool is active

Does the same apply to Illustrator?

I did search about it but could only find answers to building panels for Photoshop. Thank you.
User avatar
Kukurykus
Posts: 528
Joined: Mon Jul 25, 2016 12:36 pm

Re: Quick question on Javascript and Photoshop/illustrator UI please

Post by Kukurykus »

To do what you want you had to use some extra programming languaage together with Extendscript.
Hellen-arndt89
Posts: 5
Joined: Mon Dec 21, 2020 10:53 pm

Re: Quick question on Javascript and Photoshop/illustrator UI please

Post by Hellen-arndt89 »

Kukurykus wrote: Tue Dec 22, 2020 12:12 am To do what you want you had to use some extra programming languaage together with Extendscript.
This is excellent news to me! but reading Adobe press release notes from past months they have started to phase out Extendscript...Maybe I am confusing things. if so, pardon me.
what other language do you have in mind? I use Autohotkey and its excellent with managing standard windows/GUIs with allot of controll. Searching your post history, you too use AHK. Do you think I can use AHK as this other langugage? if not, what language do you have in mind?

Thank you!
User avatar
Kukurykus
Posts: 528
Joined: Mon Jul 25, 2016 12:36 pm

Re: Quick question on Javascript and Photoshop/illustrator UI please

Post by Kukurykus »

vbscrit can help, but AutoHotKey do it better. You won't open new panel below mouse cursor, but when it's open by extendscript, it may execute AHK to move it to cursor coordinates.

Ps. you may also think about UXP for Photoshop.
Hellen-arndt89
Posts: 5
Joined: Mon Dec 21, 2020 10:53 pm

Re: Quick question on Javascript and Photoshop/illustrator UI please

Post by Hellen-arndt89 »

Kukurykus wrote: Wed Dec 23, 2020 12:19 am vbscrit can help, but AutoHotKey do it better. You won't open new panel below mouse cursor, but when it's open by extendscript, it may execute AHK to move it to cursor coordinates.

Ps. you may also think about UXP for Photoshop.
If I understand you correctly, I can use extendscript to bring up the panel where it was last open, then trigger an AHK script to take over from there. Okay sounds great but AHK would need to know where the panel is but even then exact area of the panel that it can hold and drag, the top section of it.

Maybe extendscript knows this information and if its coordinates, it can pass them to AHK/Clipboard? if thats the case. I can definetly see how that would work.

Life would be so much more simplified if AHK spy window could identify Photoshop panels.

Thanks allot for pointing me in the right direction, much appreciated, I've allready started to read on this Vbscipt and the PDF link you shared in the other thread.
User avatar
Kukurykus
Posts: 528
Joined: Mon Jul 25, 2016 12:36 pm

Re: Quick question on Javascript and Photoshop/illustrator UI please

Post by Kukurykus »

It's how I imagined to do it, but now if I remember well I'm not sure if I was able to use AHK to find coordinates of Photoshop panels.
Hellen-arndt89
Posts: 5
Joined: Mon Dec 21, 2020 10:53 pm

Re: Quick question on Javascript and Photoshop/illustrator UI please

Post by Hellen-arndt89 »

You gave me great ideas. I am sure in good time I will find get it to work.
I will be sure to run it by you as well.

Thank you for your help. I really appreciate it.