February 2, 2023

Universal Page/scroll Indicator Horizontal/Vertical or both together.

Universal Page/scroll Indicator Horizontal/Vertical or both together.

Also in the Wiki:

I wrote a Script which makes it very easy so setup an Scroll/Page Indicator. It works Horizontal or Vertical. Indepent whether “Snap to pages” is set or not. Usable for seperate Horizontal or Vertical or Both together. 

Works for Desktop or other Containers like Panels or Folders.


Pined panel for Horizontal.(label hpanel)  or  Vertical (label vpanel) scroll. Customize as you like
In the panel a Shurtcut label hpointer or vpointer should be placed at the left (horizontal) or top (vertical). Customize as you like

Set PositionChange Event from the Container to this Script.

Suggestions or Improvements are welcome 😉

You can download Script or Template (from the Video with Script) here:

var cont=LL. getEvent(). getContainer() ;

var vpanel=’vpanel’;
var vpointer=’vpointer’;
var hpanel=’hpanel’;
var hpointer=’hpointer’;

//vertical only when panels exists
if (cont. getItemByLabel(vpanel)) {

var ctop=cont. getBoundingBox(). getTop() ;
var cbot=cont. getBoundingBox(). getBottom();

var cheight=cont. getHeight() ;

var totalv=cbot-cheight;
var actpv=cont. getPositionY() ;

if (ctop<0) {
totalv=totalv+(ctop*-1) ;
actpv=actpv+(ctop*-1) ;

var pctv=actpv/totalv;

var ipnlv=cont. getItemByLabel(vpanel). getContainer() ;
var ipnlvheight=ipnlv. getHeight() ;

var ipnlvp=ipnlv. getItemByLabel(vpointer) ;
var ipnlvpheight=ipnlvp. getHeight() ;

var ptotalv=ipnlvheight-ipnlvpheight;

var newpy=Math. round(ptotalv*pctv) *-1;

ipnlv. setPosition(0,newpy);

//horizontal only when panels exists
if (cont. getItemByLabel(hpanel)) {

var cleft=cont. getBoundingBox(). getLeft() ;
var cright=cont. getBoundingBox(). getRight();

var cwidth=cont. getWidth() ;

var totalh=cright-cwidth;
var actph=cont. getPositionX() ;

if (cleft<0) {
totalh=totalh+(cleft*-1) ;
actph=actph+(cleft*-1) ;

var pcth=actph/totalh;

var ipnlh=cont. getItemByLabel(hpanel). getContainer() ;
var ipnlhwidth=ipnlh. getWidth() ;

var ipnlhp=ipnlh. getItemByLabel(hpointer) ;
var ipnlhpwidth=ipnlhp. getWidth() ;

var ptotalh=ipnlhwidth-ipnlhpwidth ;

var newpx=Math. round(ptotalh*pcth) *-1;

ipnlh. setPosition(newpx,0);

Leave a Reply

Your email address will not be published.