Hi @dublove ,
I can answer this question with yes.
See into:
https://www.indesignjs.de/extendscriptAPI/indesign-latest/#ToolBox.html
app.toolBoxTools.currentTool
returns the active tool.
Well, it will make a difference if you are working with the selection and if you use a menu command, a menu action, for e.g. transforming the selection. See the difference between UITools.DIRECT_SELECTION_TOOL and UITools.SELECTION_TOOL for example:
app.menuActions.itemByName( "$ID/Flip Horizontal Menu Item" ).invoke();
Graphic frame selected with the selection tool.


Result after running the script:

Graphic frame selected with the direct selection tool, the bottom 2 path points are selected:

Result of the same script:

Regards,
Uwe Laubender
( Adobe Community Expert )
PS: Sorry. Had to edit my reply.
Sign up
Already have an account? Login
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inSign in to Adobe Community
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.

