[FocusedObject] Variable/GetObjectInfo - Forum

Forum Navigation
You need to log in to create posts and topics.

[FocusedObject] Variable/GetObjectInfo

Is there any way to programmatically get an object name? GetObjectInfo doesn't do it. Not all objects can be brought into focus to get its name either.

Suggestions? Perhaps a plugin?

Hello,

Not sure what you want to do. You as the author and pub-owner should know all obects of a pub.

When needed you could store a object-list  in a variable or object.

Not sure if the plugin SDK should give access to te obect list, so a plugin could do that.

Edit: Had a look in the SDK. There is no function to get the list of objects.

Regards

Hans-Peter

@hpw

My intension is something like this...

I have 100 or more square objects (rectangle or text boxes or such). All of them could have the same action command something like:

SetVar "[CurrentObj]" "[FocusedObject]"

or

GetObjectInfo

I want to duplicate as many square objects as I need without having to edit the action of each object.
A TextEntry object can use the [FocusedObject] variable but that object is problematic at best. Gain Focus action does not allow a second click without clicking elsewhere first.
GetObjectInfo includes just about everything except object name.

What I'd like is, when I click on a square I can use GoSub and have it SetObjectFill and SetVar "[ClickedBoxes]" "[ClickedBoxes];[clickedbox]" or whatever action I put in the subroutine.
But I need to know which object is clicked.

@hpw

Actually I don't mean a rectangle object. Rectangles don't have actions, but more like a button rather.

Buttons use the [Self] variable

E.g.

Setvar "[buttonKi]" "[Self]"

luishp, Vadim and proforma.guyot have reacted to this post.
luishpVadimproforma.guyot

@iretz

That is fantastic! Thanks for the tip. Exactly what I needed. It works with text box actions also and I suspect it will work elsewhere too.

iretz has reacted to this post.
iretz