I need help adding a text bar that updates with the sliders

Get help with using AutoHotkey and its commands and hotkeys
MystoganS
Posts: 3
Joined: 24 Jan 2021, 19:38

I need help adding a text bar that updates with the sliders

Post by MystoganS » 24 Jan 2021, 22:57

Basically I want to have a text bar indicate what number is selected on said slider, but I am having trouble figuring out how to do that.

Code: Select all

#SingleInstance force
Hotkey, *lbutton, Toggle

Gui, Color, 453D3B
Gui, Font, S10 CDefault, Letter Gothic Std, dbdbdb
Gui, Add, Tab, x2 y-1 w470 h250 , Home|AutoClick|Block Place
Gui, Font, S10 CDefault, Letter Gothic Std, dbdbdb
Gui, Color, 453D3B

Gui, Font, S10 CDefault, Letter Gothic Std
Gui, Add, Text, x12 y30 w230 h20 , Press scroll wheel to toggle and then hold down left click
Gui, Tab, AutoClick
Gui, Add, Text, x32 y39 w170 h20 , Min Delay (MS)
Gui, Add, Slider, x32 y59 w410 h30 vMin gMin ToolTip Range0-30, 10
Gui, Add, Text, x32 y99 w170 h20 , Max Delay (MS)
Gui, Add, Slider, x32 y119 w410 h30 vMax gMax ToolTip Range0-30, 40
Gui, Add, Text, x32 y159 w240 h20 , Jitter Power (0 = no jitter)
Gui, Add, Slider, x32 y179 w410 h30 Range0-10 ToolTip vJit gJit, 4
Gui, Tab
Gui, Tab, Block Place
Gui, Add, Text, x32 y39 w170 h20 , Min Delay (MS)
Gui, Add, Slider, x32 y59 w410 h30 vMin2 gMin2 ToolTip Range0-100, 10
Gui, Add, Text, x32 y99 w170 h20 , Max Delay (MS)
Gui, Add, Slider, x32 y119 w410 h30 vMax2 gMax2 ToolTip Range0-200, 40
Gui, Add, Text, x32 y159 w240 h20 , Jitter Power
Gui, Add, Slider, x32 y179 w410 h30 Range0-10 ToolTip vJit2 gJit2, 4

Gui, Show, x375 y242 h250 w473, Sakura Clicker | Beta 0.2
return

Min:
{
Gui, Submit, NoHide
}
return

Max:
{
Gui, Submit, NoHide
}
return

Jit:
{
Gui, Submit, NoHide
}
return

Min2:
{
Gui, Submit, NoHide
}
return

Max2:
{
Gui, Submit, NoHide
}
return

Jit2:
{
Gui, Submit, NoHide
}
return

;Autoclicker
MButton::Hotkey, *lbutton, Toggle
*lbutton::
Send,{lbutton}
While GetKeyState("lbutton", "P")
{
Send,{lbutton}
Random, delay, %Min%, %Max%
Sleep %delay%
Random, j1, %Jit%,-%Jit%
Random, j2, %Jit%,-%Jit%
MouseMove, %j1%, %j2%, 0, R
}
return

;Autoclicker2
N::Hotkey, *rbutton, Toggle
*rbutton::
Send,{rbutton}
While GetKeyState("rbutton", "P")
{
Send,{rbutton}
Random, delay, 0.2, 1
Sleep %delay%
Random, j1, %Jit2%,-%Jit2%
Random, j2, %Jit2%,-%Jit2%
MouseMove, %j1%, %j2%, 0, R
}
return

GuiClose:
ExitApp
User avatar
mikeyww
Posts: 5142
Joined: 09 Sep 2014, 18:38

Re: I need help adding a text bar that updates with the sliders

Post by mikeyww » 25 Jan 2021, 05:23

Code: Select all

min := 0
Gui, Font, s12
Gui, Add, Text, w180 vminText
Gui, Add, Slider, vmin gMin AltSubmit
Gui, Show, w200, Test
Min:
GuiControl,, minText, Min Delay (MS) = %min%
Return
garry
Posts: 2624
Joined: 22 Dec 2013, 12:50

Re: I need help adding a text bar that updates with the sliders

Post by garry » 25 Jan 2021, 05:28

@mikeyww like always was here :) / I'm to late
tooltip was ok , also an example for the first slider with text :

Code: Select all

Gui, Add, Text, x32 y39 w170 h20 vT1 cWhite, 10
Gui, Add, Slider, x32 y59 w410 h30 vMin gMin  Range0-30 altsubmit, 10

;....

Min:
{
Gui, Submit, NoHide
GuiControl,1:,T1, %Min%
}
return
Post Reply

Return to “Ask For Help”