I want to know how to get the pageItem's constructor name with Delphi.
In javacript，like this:app.selection.constructor.name.
Anyone can show me a hint to solve this problem？
There is an attempt to drive InDesign via Python but as far as I know it's very limited and windows only.
I really don't know a thing about delphi but the closest thing you could come with is to either drive the COM library on Windows (that's what the Python implementation does ) but you will probably face the same issues as it's not supported in any ways by Adobe, or call a supported language like VB or AppleScript via Delphi if it's even possible.
There are also some command line call to run ExtendScript ToolKit and so app targeted scripts.