AutoHotkey Community

It is currently May 26th, 2012, 10:54 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: October 30th, 2009, 4:29 pm 
Offline

Joined: July 4th, 2009, 6:53 pm
Posts: 36
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 November 4th, 2009, 2:27 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 30th, 2009, 4:59 pm 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8666
Location: Salem, MA
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.

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 30th, 2009, 5:09 pm 
Offline

Joined: July 4th, 2009, 6:53 pm
Posts: 36
It worked, thank you.

PS: Over 9000!


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: hyper_, JSLover, Kirtman, Leef_me, Maestr0, Miguel, XstatyK, Yahoo [Bot] and 61 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group