Skip to main content
Known Participant
February 7, 2021
Question

How can I lock the UI scrollbar's position when it reaches a certain value? a

  • February 7, 2021
  • 2 replies
  • 550 views

The scrollbar in javascript has a .value attribute. When the value = 100 out of 200, I would like the position of the scrollbar to then be prevented from visually and numerically moving any further. Is there an attribute that can control these in javascript? 

This topic has been closed for replies.

2 replies

Legend
February 7, 2021

 

scrollbar.onChanging = function () {this.value = this.value >= 100 ? 100 : this.value}

 

JJMack
Community Expert
Community Expert
February 7, 2021

I thought the OP was referring to an image's  scrollbar not a dialog  scriptui scrollbar. I missed the UI int the title....

JJMack
Known Participant
February 7, 2021

Sorry not the scrollbar itself, but the little scroller you click and drag inside of it.

JJMack
Community Expert
Community Expert
February 7, 2021

What make you think a Photoshop Script can do anything to Photoshop UI scroll bars?  Even using Photoshop UI interactivity you can not lock a scroll bar slider at some position.  There is no  position numerical value indicator either. There is no reference to SCROLL if you search Adobe Javascript reference and the scriptlistener plug-in does not record any actions manager code when you scroll an image. Also the are no shortcuts for scrolling or menu menu  item for scrolling images. 

JJMack