Slider and Progress Range Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
x32
Posts: 177
Joined: 25 Nov 2016, 16:44

Slider and Progress Range

Post by x32 » 28 Jan 2023, 18:11

This is a piece of a script I'm working on I separated out for trouble shooting. The slider is only for troubleshooting, I need the progress bar range set to 0 to 125. As far as I can tell I have the control correct but I still only get a range of 0 to 100. Same with the slider.

I get an output from the slide, and a range in the bar, of 0 to 100 no matter what range I set in the control. Even if I GuiControl to a specific value I only get a range of 0 to 100 for the progress bar.

What am I doing wrong here? Thanks

Code: Select all

#NoEnv  
SendMode Input  
SetWorkingDir %A_ScriptDir%  
#SingleInstance, Force
Gui, Margin, 5, 5
Gui, Font, s16 c0000FF, Arial
Gui, Color, Black 

Gui, Add, Slider, x5 y5 w50 h200 Invert Vertical AltSubmit vs1 gs1, Range0-125
Gui, Add, Progress, x75 y5 w200 h260 Vertical BackgroundBlack c3636f7  vp1, Range0-125
Gui, Add, Text, x5 y225 w50 Center vt1, 000
;GuiControl, , p1, 110

Gui, Show,  , Range Test 
Return

s1:
Gui, Submit, NoHide 
GuiControl, , p1, %s1%
GuiControl, , t1, %s1%
Return

Exit:
GuiEscape:
GuiClose:
Gui, Destroy
ExitApp
Return

User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: Slider and Progress Range  Topic is solved

Post by mikeyww » 28 Jan 2023, 18:21

Range is an option, so it belongs in the same parameter as the other options.

Explained: Slider
To specify more than one option, include a space between each. Specify the starting position of the slider as the last parameter.

x32
Posts: 177
Joined: 25 Nov 2016, 16:44

Re: Slider and Progress Range

Post by x32 » 28 Jan 2023, 18:30

mikeyww wrote:
28 Jan 2023, 18:21
Range is an option, so it belongs in the same parameter as the other options.
Doh, I knew it was going to be something obvious. Thanks

Post Reply

Return to “Ask for Help (v1)”