Skip to main content
dublove
Legend
Apr 18, 2025 6:20 PM UTC
Question

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

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.

 

4 replies

Robert at ID-Tasker
Legend
Apr 18, 2025 10:08 PM UTC

@dublove

 

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

 

Translate
dublove
dubloveAuthor
Legend
Apr 19, 2025 10:27 AM UTC

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

Translate
brian_p_dts
Community Expert
Community Expert
Apr 19, 2025 5:56 PM UTC

Seems like one even chatgpt could answer...

Translate
brian_p_dts
Community Expert
Community Expert
Apr 18, 2025 8:42 PM UTC

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

Translate