Skip to main content
dublove
Legend
April 18, 2025
Question

Can the script distinguish if I'm selecting an image or a text box?

  • April 18, 2025
  • 2 replies
  • 239 views

Can the script distinguish if I'm selecting an image or a text box?
For example, if I select an image, it returns: you selected image 1.
If I select both, it returns: You selected image 1 and textbox 1.

 

2 replies

Robert at ID-Tasker
Legend
April 18, 2025

@dublove

 

We are helping you with scripts for so many years - and you're asking such question? 

 

dublove
dubloveAuthor
Legend
April 19, 2025

The question does seem a bit abstract ......

brian_p_dts
Community Expert
Community Expert
April 19, 2025

Seems like one even chatgpt could answer...

brian_p_dts
Community Expert
Community Expert
April 18, 2025

A script can do that, sure. For each item in app.selection, iterate through and alert(app.selection[i].constructor.name).