script move in bpatcher

Roman Thilenius's icon

shit.

i have to do

"script size thing 20 28, script move thing 100 0"

with a GUI element.

it works great, but it does not work when it is inside a bpatcher,
which is where i need it.

in a bpatcher the "move" script moves to positions in the root level.
before you ask: yes of course, it is connected to a [thispatcher]
inside the bpatcher.

hopefully i have only missed something?

110 @max4

p.s.: measuring the relative position wont help, i need to move
the bpatcher around.

.

ch's icon

Hi,

You right. that's weird.

fortunately "script sendbox thing patching_position $1 $2"
and "script sendbox thing patching_rect $1 $2 $3 4", etc. work fine.

Ch.

Bas van der Graaff's icon

Yup, it's been like that for ages...
You can use this to get the coords of the bpatcher and add, but it remains a pita - getorigin.js:

/*
* get the coordinates of the bpatcher box - jasch 20060914
*/

function bang()
{
outlet(0, this.patcher.box.rect);
}

Roman Thilenius's icon

ok guys, it seems i will have to use "offset" or "offsetfrom", hopefully that
will work through all systems.

it is a little bit more work to calculate the positions with that but
at least it doesnt run accross the screen like a 055+36 experiment.

-110