so
ich wollte grad das soundvolumen des scriptes ändern
aba da ich da mit der sound.au3 arbeite scheint das mit soundsetwavevolume nich zu funktionieren
wie würde das gehen
Soundsetwavevolume und Sound.au3
-
- [ offen ]
-
yxyx -
11. Mai 2010 um 18:58 -
Geschlossen -
Erledigt
-
-
[autoit]
SoundSetWaveVolume(GUICtrlRead($idsliderVol))
[/autoit]übernimmt von einem Slider die Prozentangabe. Den Slider musst du mit
[autoit]GUICtrlSetLimit(-1, 100, 0) ;maximal 100 minimal 0
[/autoit]auf die gewünschten Werte limitieren. Es gibt auch zumindest unter XP Prof SP3 keine Unverträglichkeiten mit der Sound.Au3.
mfg (Auto)Bert
-
Zitat
XP Prof SP3
hmm hab vista
daran könnts liegen
-
Ich benutz auch Vista.
[autoit]
Hier mal eins von meinen alten (eig wie von AutoBert):Func _volume()
[/autoit]
$slider1 = GUICtrlRead($volume)
SoundSetWaveVolume($slider1)
EndFunc
Sound.au3 muss unter include stehen.
Problem is, dass es die Höhe der Lautstärke zu Begin auf 100 setzt. Man kann also prinzipiell nur die Lautstärke verringern. -
hmm i wie geht das bei mir nich
-
Kanns am Gdi Slider liegen?
mfg Ubuntu
-
ne der gibt ja mit _GdiPlus_ReadSlider nen zahlenwert zurück
-
ne der gibt ja mit _GdiPlus_ReadSlider nen zahlenwert zurück
diese Funktion ist mir unbekannt.
mfg (Auto)Bert
-
naja hab für doodle jump so ne kleine gdi+ slider udf gemacht
Spoiler anzeigen
[autoit]Func _GDIPlus_CreateSlider($hGraphics, $x, $y, $width, $wert, $color1, $color2, $maxwert = 100)
[/autoit] [autoit][/autoit] [autoit]
;~ Author: yxyx
Opt("MouseCoordMode", 0)
Local $dll
$dll = DllStructCreate("int;int;int;int;int;int;int;int;int")
DllStructSetData($dll, 1, $x)
DllStructSetData($dll, 2, $y)
DllStructSetData($dll, 3, $wert)
DllStructSetData($dll, 4, $color1)
DllStructSetData($dll, 5, $color2)
DllStructSetData($dll, 6, $hGraphics)
DllStructSetData($dll, 8, $maxwert)
DllStructSetData($dll, 9, $width)
Return $dllEndFunc
[/autoit] [autoit][/autoit] [autoit]Func _GDIPlus_CheckSlider($dll)
[/autoit] [autoit][/autoit] [autoit]
;~ Author: yxyx
Local $pos = MouseGetPos(), $userdll = DllOpen("user32.dll"), $dllread[9] = [DllStructGetData($dll, 1), DllStructGetData($dll, 2), DllStructGetData($dll, 3), DllStructGetData($dll, 4), DllStructGetData($dll, 5), DllStructGetData($dll, 6), DllStructGetData($dll, 7), DllStructGetData($dll, 8), DllStructGetData($dll, 9)]
Local $dllwrite, $step = $dllread[8]/$dllread[7], $penlines = _GDIPlus_PenCreate($dllread[3], 2), $penfill = _GDIPlus_BrushCreateSolid($dllread[4])
_GDIPlus_GraphicsDrawLine($dllread[5], $dllread[0], $dllread[1]+10, $dllread[0]+$dllread[8], $dllread[1]+10, $penlines)If _IsPressed("01", $userdll) Then
[/autoit] [autoit][/autoit] [autoit]
If ($pos[0] > $dllread[0]+$step*$dllread[2]-5 and $pos[0] < $dllread[0]+$step*$dllread[2]+5 and $pos[1] > $dllread[1] and $pos[1] < $dllread[1]+20) or $dllread[6] Then
DllStructSetData($dll, 7, "1")
$dllwrite = Round(($pos[0]-$dllread[0])/$step)
If $pos[0] <= $dllread[0] Then $dllwrite = 0
If $pos[0] >= $dllread[0]+$dllread[8] Then $dllwrite = $dllread[7]
DllStructSetData($dll, 3, $dllwrite)
Else
DllStructSetData($dll, 7, "0")
EndIf
Else
DllStructSetData($dll, 7, "0")
EndIf
Local $points[6][2] = [[5,0], [$dllread[0]+$step*$dllread[2] -5, $dllread[1]],[$dllread[0]+$step*$dllread[2] -5, $dllread[1]+17],[$dllread[0]+$step*$dllread[2], $dllread[1]+20],[$dllread[0]+$step*$dllread[2] +5, $dllread[1]+17],[$dllread[0]+$step*$dllread[2] +5, $dllread[1]]]_GDIPlus_GraphicsFillPolygon($dllread[5], $points, $penfill)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
_GDIPlus_GraphicsDrawPolygon($dllread[5], $points, $penlines)
EndFuncFunc _GDIPlus_ReadSlider($dll)
[/autoit] [autoit][/autoit] [autoit]
;~ Author: yxyx
Return DllStructGetData($dll, 3)
EndFuncFunc _GDIPlus_SetSliderColor($dll, $color, $number)
[/autoit]
;~ Author: yxyx
If $number < 1 and $number > 2 Then Return
Return DllStructSetData($dll, 3+$number, $color)
EndFunc