Sg2.9
Get attributes of selected It...
Recent RSS
Get attributes of selected Item/Object
From:  schlumpfi
Date:  5. August 2013, 13:44

Hey there,

I want to have an Palette-window equal to the Transform-Palette in Illustrator, where I can get the values of an objects attributes.

So … for example when I click (or select) an item on the artboard, I want to get width and height (or any other attr.), but WITHOUT clicking on a extra button like "show" in the palette-window itself. So it should listen to objects the user selects … like "items.onClick()"

1. Is that possible?
2. How can I do this?

btw is it possible to have a listener like "artboard.onChange()", so that the script executes when changes to the artboard are happening?

THX in advance!

Re: Get attributes of selected Item/Object
Date:  7. August 2013, 00:20

There are many useful examples in the tutorials - they are worth reading.
One might start here ...
function onMouseDown(event) {
// Check whether an item was clicked on:
if(event.item) {
... update the values in the palette
}
}

Scripts
08.08.14, 15:24
15.05.14, 14:23
02.03.14, 19:16
18.11.13, 14:48
22.03.13, 03:05
22.02.13, 15:45
Posts
10.01.17, 16:37
19.02.16, 06:03
19.02.16, 06:00
17.01.16, 11:00
12.01.16, 13:10
25.11.15, 08:19
Script of the Moment
Stroke Translation 10.03.09