Jump to content

How do i make events for a slide bar?


Recommended Posts

I making a Autoclicker and i want the speed to be controlled by a slider bar that is vertical. i found a vertical one on the forum but i dont know to set events for it.. I want to have 6 stage Slowest,Slow,Normal,Fast,Fastest and Extreme. but how?

#include <GUIConstants.au3>

$My_GUI = GUICreate("slider",220,220, 100,200)
GUISetBkColor (0x00E0FFFF); will change background color

$slider1 = GUICtrlCreateSlider (10,10,20,200,BitOR($TBS_AUTOTICKS,$TBS_VERT))
GUICtrlSetLimit(-1,0,-100) ; change min/max value
$button = GUICtrlCreateButton ("Value?",75,70,70,20)
GUICtrlSetData($slider1,-45); set cursor

  $n = GUIGetMsg ()
   If $n = $button Then
      MsgBox(0,"slider1",Int(GUICtrlRead($slider1)) * -1,2) 
Link to comment
Share on other sites

You could take a look at the event-driven GUI mode, but it takes a lot of processing.

You can simulate an event using AdlibEnable to run a checking function every x milliseconds.

something like this:

AdlibEnable ("CheckForEvents", 200)

; Put GUI lines here

While (1)
    ; Put GUI loop lines here

Func CheckForEvents ()
    Switch (GUICtrlRead ($SliderBar)
        ; The cases go here

[quote name='Valik' post='301213' date='Jan 31 2007, 10:36 PM']You seem to have a habit of putting things in the wrong place. I feel sorry for any female you attempt to have sex with.[/quote][font="Lucida Sans Unicode"][/font]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...