 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
ghee22
Joined: 04 Jul 2009 Posts: 36
|
Posted: Fri Oct 30, 2009 3:29 pm Post subject: [SOLVED] Modify slider value, move slider to specific value |
|
|
Within an AHK window, how does one modify the value of a slider?
I have a button that adds a set of values to a queue. I want the slider to show which set of values the user is currently modifying. So far the button correctly modifies the range. My problem is having the slider set to the last value in the range.
My slider code is below:
| Code: | Gui, Add, Slider, xp+500 Range1-1 ToolTip gCRQ_slider vCRQ_slider, 2
Gui, Add, Button, xp+200, Add
CRQ_slider:
Gui, Submit, nohide
Return
ButtonAdd:
Gui, Submit, NoHide ; Save each control's contents to its associated variable.
crq_number++
GuiControl, +Range1-%crq_number%, CRQ_slider
Return
|
Last edited by ghee22 on Wed Nov 04, 2009 1:27 pm; edited 1 time in total |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 7698 Location: Germany (but I only speak English)
|
Posted: Fri Oct 30, 2009 3:59 pm Post subject: |
|
|
for guicontrol and sliders:
| Quote: |
UpDown/Slider/Progress: Param3 should be the new position of the control. If a Param3's first character is a plus sign, the number will be assumed to be an offset from the current position. For example, +10 would increase the position by 10 and +-10 (plus minus ten) would decrease it by 10. If the new position would be outside the range of the control, the control is generally set to the nearest valid value.
|
try
| Code: | Gui, Add, Slider, xp+500 Range1-1 ToolTip gCRQ_slider vCRQ_slider, 2
Gui, Add, Button, xp+200, Add
CRQ_slider:
Gui, Submit, nohide
Return
ButtonAdd:
Gui, Submit, NoHide ; Save each control's contents to its associated variable.
crq_number++
GuiControl, +Range1-%crq_number%, CRQ_slider
GuiControl, , CRQ_slider, %crq_number%
Return
|
or take advantage of the last statement from the help quote and alway set it to OVER NINE THOUSAND and it will generally max out the slider. _________________
Unless noted, all code is UNTESTED.
Answers Here: 1.(Loops, Viruses, etc.) 2.Search 3.RTFM 4.Ask for Help.
PMs will be ignored unless you are hiring me. |
|
| Back to top |
|
 |
ghee22
Joined: 04 Jul 2009 Posts: 36
|
Posted: Fri Oct 30, 2009 4:09 pm Post subject: |
|
|
It worked, thank you.
PS: Over 9000! |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|