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

New Here ,
Feb 07, 2021 Feb 07, 2021

Copy link to clipboard

Copied

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? 

TOPICS
Actions and scripting, How to, Windows

Views

99

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 07, 2021 Feb 07, 2021

Copy link to clipboard

Copied

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

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Most Valuable Participant ,
Feb 07, 2021 Feb 07, 2021

Copy link to clipboard

Copied

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

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 07, 2021 Feb 07, 2021

Copy link to clipboard

Copied

 

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

 

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Most Valuable Participant ,
Feb 07, 2021 Feb 07, 2021

Copy link to clipboard

Copied

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

JJMack

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines