scrolling patcher

johannotto's icon

hi there,
is there a way for thispatcher (or any other object) of scrolling the actual patcher on the x-axis? (I don't want to pack everything in a bpatcher and do it with offsets)...
?,
thx,
johann

Luke Hall's icon

Try using this javascript.

An integer sent to the first inlet will jump horizontally along the top of your patch, an integer to the second inlet will jump vertically down the left side of your patch. Alternatively a 2 element list in the first inlet will set the x,y offset to move to. I hope it helps.

lh

inlets = 2;

function list(a)
{
if (arguments.length == 2)
{
this.patcher.wind.scrollto(arguments[0],arguments[1]);
}
}

function msg_int(b)
{
if (inlet == 0)
{
this.patcher.wind.scrollto(b,0);
}
else
{
this.patcher.wind.scrollto(0,b);
}
}

johannotto's icon

big thx!

Padrut Tacchella's icon

Hello, I'm working on a very long patcher and try to scroll down quicker than with the mouse. I tried with [thispatcher], but cannot find the argument it needs... (I'm on Max 9.1.3). Seems to be near the question you replied... can you help me ?