Sign in to follow this  
Followers 0
Doxie

Combine 2 scripts, to make volume control

1 post in this topic

#1 ·  Posted (edited)

Thanks to Nova and Scripkitty i now got very close to what i need.

But this is out of my leauge, i have no idea about this kind of stuff.

Below you can see two scripts, i need them to work together, i guess i don't need to explain how they should work together, its obvious. :idiot:

If someone can gimme an idea, point me in the right direction, i can give it a go.

Thanks

Nova

#include "GUIConstants.au3"

$Gui = GUICreate("Novasoft - Wave Volume Control", 200, 20, -1, -1, $WS_POPUP)
$slider = GuiCtrlCreateSlider (0, 0,200,20)
GUICtrlSetLimit(0,100,0)   
GUICtrlSetData($slider, 20)   
GuiSetState()

$volume = GuiCtrlRead($slider)
$current_selecter_pos = GuiCtrlRead($slider)
$last_selecter_pos = $current_selecter_pos 

While 1
   Sleep(10)
   $current_selecter_pos = GuiCtrlRead($slider)
      If $last_selecter_pos = $current_selecter_pos Then
         
       Else
         $volume = GuiCtrlRead($slider)
         SoundSetWaveVolume($volume)
         $last_selecter_pos = $current_selecter_pos
      EndIf
wend

Scripkitty

This is just a demo script, and can not be "Copy/Pasted" to work correctly. Run it and you will see what i mean.

#include <GUIConstants.au3>

GUICreate("My GUI"); will create a dialog box that when displayed is centered
GUISetState (@SW_SHOW)    ; will display an empty dialog box
$n=GUICtrlCreatePic("circle.jpg",60,60,100,100)
$n2=GUICtrlCreatePic("button.gif",100,120,27,27)
$x=100
$y=110
$t=1
$m=1
While 1
If $t=2 Then 
    $start=25
    $finish=-25
 $t=1
 $n=-1
Draw()
Else
    $start=-25
    $finish=25
    $t=2
    $n=1
Draw()
EndIf
Wend

Func draw()
For $x=$start To $finish Step $n
 $y=Sqrt(625-($x*$x))    
   $msg = GUIGetMsg()
   GUICtrlSetPos ( $n2, 98+$x,(98+$y*$n))
   tooltip($start&@CR&$t,0,0)
   sleep(10)
Next
EndFunc
Edited by Doxie

Were ever i lay my script is my home...

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