Sign in to follow this  
Followers 0
eagle4life69

Custom Slider

12 posts in this topic

;~ Volume
$Volume = GuiCtrlCreateSlider(0, 210, 75, 20)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

GuiCtrlCreateLabel("Volume", 0, 200, 40, 15)
GUICtrlSetColor(-1,0x000000)    ; Gray
GUICtrlSetBkColor(-2, $GUI_BKCOLOR_TRANSPARENT)


Case Else
                If GUICtrlread($Volume) <> $VolLevel Then
                    $oMediaPlaySettings.Volume = GUICtrlRead($Volume)
                    $VolLevel = GUICtrlRead($Volume)
                EndIf

The Above script isn't complete I know But this is the Volume parts.

So how can I make it look more like the Picture. There has to be a way. I need the ball to move and the Volume to be controled by the ball.

Please Help

post-8340-1170319697_thumb.jpg

Share this post


Link to post
Share on other sites



Okay I was playing around and was able to make the ball move. Now how can I make it so it stays on the bar and can not go past the bar.

#include <Array.au3>
#include <File.au3>
#include <GuiConstants.au3>
#Include <GuiEdit.au3>
#include <Misc.au3>
#include <GuiList.au3>
AutoItSetOption('MouseCoordMode',2)
GUICreate("Test")

GUICtrlCreatePic("bar.gif",30,50,0,0)
$ball = GUICtrlCreatePic("ball.gif",50,60,0,0)


GUISetState()
$msg = 0
While 1
     $msg = GUIGetMsg()
Select
   
    Case $msg = $GUI_EVENT_CLOSE
        Exit
    Case $msg = $ball
    while MouseClick("left")
    Do
    $pos = MouseGetPos()
    ControlMove ( "", "", $ball, $pos[0],$pos[1]  )
    Until MouseClick("left")
ExitLoop
WEnd


EndSelect
WEnd

Share this post


Link to post
Share on other sites

MouseClick performs a mouse-click..it doesn't check for one.

Share this post


Link to post
Share on other sites

MouseClick performs a mouse-click..it doesn't check for one.

Okay so how can I check for mouse click. My script works just not exactly how I want. Try it and you will see. Oops I forgot the Image files here they are

post-8340-1170352882_thumb.gif

Share this post


Link to post
Share on other sites

Looks like this works great. Once I get it to work as a volume control I'll be good.

Thanks

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Okay here is the Completed Program

Here is the Link

If you find a bug please let me know

Here is a Screen Shot of the Player

Posted Image

It takes the XML File and splits the data then it takes the Slider that was worked on from Above and puts it to use as a Volume Control.

Thanks to everyone for your help it turned out just like I wanted

Edited by eagle4life69

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

I kown that this topic is old but I really need this slider to get working.

does anyone have a better idea for this?

Edited by n1maS

Share this post


Link to post
Share on other sites

Hi, n1maS. It is generally not a good idea to resurrect such an old post. AutoIt is a constantly evolving language; what worked in 2007 is not likely to work the same now. You will likely get a much better response from forum members if you:

  • read the forum rules and ensure what you're trying to do doesn't violate them.
  • create a new topic of your own
  • explain in detail what you are trying to accomplish
  • provide code you have tried already (even if it doesn't work)
  • understand that it may take some time for someone to respond (wait at least 24 hours)

When you're dead, you don't know you're dead - it's only difficult for those that know you. It's the same way when you're stupid...

My Scripts: SCCM UDFInclude Source with Compiled Script, Windows Firewall UDF

Share this post


Link to post
Share on other sites

Hi, JLogan3o13.

Thank you for your response.

I've no problem creating a new topic.

sorry for posting in the first place.

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

Moved to

Br,

UEZ

Edited by UEZ
1 person likes this

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯

Share this post


Link to post
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
Sign in to follow this  
Followers 0