Skip to main content
Pabacus
Participant
December 20, 2017
Question

options of info panel

  • December 20, 2017
  • 1 reply
  • 1166 views

Hello,

I am a newbie in ExtendScript.

How to get the value of the info panel timing option ?

Thx.

This topic has been closed for replies.

1 reply

Kukurykus
Legend
December 20, 2017

You mean Profile / Show Timing ?

Pabacus
PabacusAuthor
Participant
December 20, 2017

Yes, I want to get this value in a script to check if a user clicked on the canvas.

I want to compare between the last value and the new value, if the two values are different, the canvas was clicked.

Pabacus
PabacusAuthor
Participant
December 21, 2017

I had no time to write anything for you, but honestly you don't need to do that way I think you want. You can apply timing function not bound to ExtendScript Toolkit. It's quite easy, I have idea how to do it. As to clicking on canvas I guess you're using notifiers? If so there must be used some certain tool that is recorded by ScriptListener. Which one is it in your case? Selecting tool is recordable for sure, so notifier can record user selected that desired and make ready for some click on canvas. Probably there are more tools which use can be detected without specifing which one it is. It's why recording choosen tool before clicking canvas is so important. What I know you can click on layer, that one from panel of layers what'll be seen by notifier, but with a canvas there may be problem. I wonder what tool you're talking about?


Sorry, my question is too vague:

I want each time user clicked with the pen tool or erase tool on the canvas, photoshop export an image to use it as a preview in an extension.

I don't think notifiers can be used to solve my problem because for me is not possible to use a notifier object with the canvas.

The user may have clicked several times so the only solution I found is to use the timing option of the info panel and check if the value changes.

I think the best way to process is to use low-level in Photoshop, but I don't understand how to use ActionDescriptor() and ActionReference() objects and I have no idea what key to use.