Help defining variable in simple GUI Slider script

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
ownzies
Posts: 1
Joined: 13 Jun 2021, 15:41

Help defining variable in simple GUI Slider script

13 Jun 2021, 15:55

Im trying to make a simple GUI slider that will set a variable to later be used in defining how many times the script will loop. This is my first time using AHK for GUIs or anything more than simple keypresses, and im not sure what im doing wrong.

Here is my script
Spoiler
What am i doing wrong? Can anybody fix this for me?
User avatar
mikeyww
Posts: 26848
Joined: 09 Sep 2014, 18:38

Re: Help defining variable in simple GUI Slider script

13 Jun 2021, 16:58

In debugging your script, displaying the values of variables can help. You can use MsgBox to do that. This demo may help.

Code: Select all

Gui, Font, s10
Gui, Add, Text, x84 y70 w350 h50, Title
Gui, Add, Button, x110 y130 w90 h50 c0xFF0000 Default, Enable
Gui, Add, Slider, x0 y230 w310 ToolTip TickInterval1 Line2 Range1-30 vslider
Show:
Gui, Show, x933 y315 w310 h290
Return

ButtonEnable:
Gui, Submit
MsgBox, 64, Slider value, %slider%
Loop, %slider%
 Send {WheelDown}{Enter}
Gosub, Show
Return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 247 guests