|
You last visited: Today at 10:05
Advertisement
"if" mehrere Befehle...
Discussion on "if" mehrere Befehle... within the AutoIt forum part of the Coders Den category.
11/03/2010, 19:25
|
#16
|
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,147
|
Du musst die Lautstärke von Mozilla nicht ändern, es würde eigentlich auch nichts bringen.
Wenn ich dich richtig verstanden habe, suchst du sowas:
PHP Code:
#include <EditConstants.au3> #include <GUIConstantsEx.au3> $Form1 = GUICreate("Titel", 155, 85) GUISetBkColor(0xFFFFFF) GUICtrlCreateLabel("Passwort:", 10, 10, 50, 17) $I_Passwort = GUICtrlCreateInput("", 10, 30, 135, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL)) $B_OK = GUICtrlCreateButton("OK", 10, 55, 135, 25) $Form2 = GUICreate("Titel", 155, 90) GUISetBkColor(0xFFFFFF) $B_Play = GUICtrlCreateButton("Play", 10, 10, 65, 25) $B_Stop = GUICtrlCreateButton("Stop", 80, 10, 65, 25) GUICtrlCreateLabel("Lautstärke:", 10, 45, 57, 17) $S_Volume = GUICtrlCreateSlider(10, 60, 135, 25) GUICtrlSetData(-1, 50) GUICtrlSetBkColor(-1, 0xFFFFFF) GUISetState(@SW_SHOW, $Form1) Global $Radio = ObjCreate("WMPLayer.ocx") $Radio.URL = "http://217.151.152.245/bigfm-mp3-96" $Radio.Controls.Stop() While Sleep(10) $nMsg = GUIGetMsg(1) If $nMsg[1] == $Form1 Then Switch $nMsg[0] Case $GUI_EVENT_CLOSE Exit Case $B_OK If GUICtrlRead($I_Passwort) == "Sascha" Then GUISetState(@SW_HIDE, $Form1) GUISetState(@SW_SHOW, $Form2) Else $MsgBox = MsgBox(53, "Fehler", "Das eingegebene Passwort ist falsch!") If $MsgBox == 2 Then Exit EndIf EndSwitch ElseIf $nMsg[1] == $Form2 Then Switch $nMsg[0] Case $GUI_EVENT_CLOSE Exit Case $B_Play $Radio.Controls.Play() Case $B_Stop $Radio.Controls.Stop() EndSwitch EndIf $Volume = GUICtrlRead($S_Volume) If $Volume <> $Radio.Settings.Volume() Then $Radio.Settings.Volume() = $Volume EndIf WEnd
|
|
|
11/03/2010, 19:32
|
#17
|
elite*gold: 0
Join Date: Jul 2010
Posts: 450
Received Thanks: 78
|
danke aber geht das denn nicht auch mit dem Link:
??
|
|
|
11/03/2010, 20:11
|
#18
|
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,147
|
Du möchtest doch ein Webradio und was soll man den von der Hauptseite abspielen?
Es gibt nichts, dafür musst du schon die Radiostreams benutzen.
|
|
|
11/03/2010, 20:16
|
#19
|
elite*gold: 0
Join Date: Jul 2010
Posts: 450
Received Thanks: 78
|
_IECreate("http://static.bigfm.de/content/pictures/swf/battle.swf", 1, 0)
so gehts doch... nur brauch ich da halt nur die Lautstärke verändern.
|
|
|
11/03/2010, 20:23
|
#20
|
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,147
|
Ich versteh nicht, wo dein Problem sein soll, ich hab dir doch ein "gutes" Beispiel erstellt,
du musst nur den Link anpassen ($Radio.URL = "").
|
|
|
11/03/2010, 20:33
|
#21
|
elite*gold: 0
Join Date: Jul 2010
Posts: 450
Received Thanks: 78
|
ahso ok dann danke ich melde mich zurück
schade das geht net...
|
|
|
11/03/2010, 20:50
|
#22
|
elite*gold: 0
Join Date: Jul 2008
Posts: 832
Received Thanks: 136
|
Quote:
Originally Posted by eagly200
ahso ok dann danke ich melde mich zurück
schade das geht net...
|
finde hier das richtige, scanne es mit CE und mach das dann mit memoryread oder memorywrite oder so (kenn mich da noch nicht aus)
€dit: mein pc hat schon macken lautstärke auf 25% ist abnormal laut in kopfhörern, in manchen games(wie s4league) ist mein regler bei ca. 5% und die lautstärke ist da schon angenehm ô.O
|
|
|
11/03/2010, 20:52
|
#23
|
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,147
|
Quote:
Originally Posted by eagly200
ahso ok dann danke ich melde mich zurück
schade das geht net...
|
+ 2 Zeilen und alles geht:
PHP Code:
#include <EditConstants.au3> #include <GUIConstantsEx.au3> $Form1 = GUICreate("Titel", 155, 85) GUISetBkColor(0xFFFFFF) GUICtrlCreateLabel("Passwort:", 10, 10, 50, 17) $I_Passwort = GUICtrlCreateInput("", 10, 30, 135, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL)) $B_OK = GUICtrlCreateButton("OK", 10, 55, 135, 25) $Form2 = GUICreate("Titel", 155, 90) GUISetBkColor(0xFFFFFF) $B_Play = GUICtrlCreateButton("Play", 10, 10, 65, 25) $B_Stop = GUICtrlCreateButton("Stop", 80, 10, 65, 25) GUICtrlCreateLabel("Lautstärke:", 10, 45, 57, 17) $S_Volume = GUICtrlCreateSlider(10, 60, 135, 25) GUICtrlSetData(-1, 50) GUICtrlSetBkColor(-1, 0xFFFFFF) GUISetState(@SW_SHOW, $Form1) Global $Radio = ObjCreate("WMPLayer.ocx") ;$Radio.URL = "http://217.151.152.245/bigfm-mp3-96" $Radio.URL = "http://static.bigfm.de/content/pictures/swf/battle.swf" $Radio.Controls.Stop() While Sleep(10) $nMsg = GUIGetMsg(1) If $nMsg[1] == $Form1 Then Switch $nMsg[0] Case $GUI_EVENT_CLOSE Exit Case $B_OK If GUICtrlRead($I_Passwort) == "Sascha" Then GUISetState(@SW_HIDE, $Form1) GUISetState(@SW_SHOW, $Form2) Else $MsgBox = MsgBox(53, "Fehler", "Das eingegebene Passwort ist falsch!") If $MsgBox == 2 Then Exit EndIf EndSwitch ElseIf $nMsg[1] == $Form2 Then Switch $nMsg[0] Case $GUI_EVENT_CLOSE Exit Case $B_Play $Radio.Controls.Play() Case $B_Stop $Radio = ObjCreate("WMPLayer.ocx") $Radio.URL = "http://static.bigfm.de/content/pictures/swf/battle.swf" $Radio.Controls.Stop() EndSwitch EndIf $Volume = GUICtrlRead($S_Volume) If $Volume <> $Radio.Settings.Volume() Then $Radio.Settings.Volume() = $Volume EndIf WEnd
|
|
|
11/04/2010, 12:35
|
#24
|
elite*gold: 0
Join Date: Jul 2010
Posts: 450
Received Thanks: 78
|
JUHUUUUUUUUUUUUUUUUUUUUUUUUUUUU.............
DANKE!!!!!!!!
also wirklich Danke
was ich jetzt noch bräuchte:
Den Befehl WinSetOnTop ($Titel,"",1) so eingebaut das es geht, weil ich habe es überall in die While-Schleife eingesetzt aber es ging nicht....
Und dann noch (weil ich zwar eine idee hätte WIE das dann geht aber nicht wie man das wieder aus macht): eine "Lautlos"-Taste/Funktion.
|
|
|
11/04/2010, 19:09
|
#25
|
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,147
|
Benutze bei der Form einfach $WS_EX_TOPMOST.
Das muten ist relativ einfach, du musst einfach die Lautstärke auslesen, sie in eine
Variable speichern und die anschließend auf 0 setzen.
Klickt man ein weiteres mal auf den Button setzt man einfach die Lautstärke auf den
gespeicherten Wert.
Wahlweise kann man den Slider zur Regulierung der Lautstärke auch zwischenzeitlich
deaktivieren.
Ich hab es einfach mal so gemacht:
PHP Code:
#include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Radio", 155, 85) GUISetBkColor(0xFFFFFF) GUICtrlCreateLabel("Passwort:", 10, 10, 50, 17) $I_Passwort = GUICtrlCreateInput("", 10, 30, 135, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL)) $B_OK = GUICtrlCreateButton("OK", 10, 55, 135, 25) $Form2 = GUICreate("Radio", 155, 90, -1, -1, -1, $WS_EX_TOPMOST) GUISetBkColor(0xFFFFFF) $B_Play = GUICtrlCreateButton("Play", 10, 10, 65, 25) $B_Stop = GUICtrlCreateButton("Stop", 80, 10, 65, 25) GUICtrlCreateLabel("Lautstärke:", 10, 45, 60, 17) $B_Mute = GUICtrlCreateButton("Mute", 80, 35, 65, 25) $S_Volume = GUICtrlCreateSlider(10, 60, 135, 25) GUICtrlSetData(-1, 50) GUICtrlSetBkColor(-1, 0xFFFFFF) GUISetState(@SW_SHOW, $Form1) Global $Radio = ObjCreate("WMPLayer.ocx") Global $WebRadioURL = "http://static.bigfm.de/content/pictures/swf/battle.swf" $Radio.URL = $WebRadioURL $Radio.Controls.Stop() Global $Mute = True, $Mute_Volume While Sleep(10) $nMsg = GUIGetMsg(1) If $nMsg[1] == $Form1 Then Switch $nMsg[0] Case $GUI_EVENT_CLOSE Exit Case $B_OK If GUICtrlRead($I_Passwort) == "Sascha" Then GUISetState(@SW_HIDE, $Form1) GUISetState(@SW_SHOW, $Form2) Else $MsgBox = MsgBox(53, "Fehler", "Das eingegebene Passwort ist falsch!") If $MsgBox == 2 Then Exit EndIf EndSwitch ElseIf $nMsg[1] == $Form2 Then Switch $nMsg[0] Case $GUI_EVENT_CLOSE Exit Case $B_Play $Radio.Controls.Play() Case $B_Stop $Radio = ObjCreate("WMPLayer.ocx") $Radio.URL = $WebRadioURL $Radio.Controls.Stop() Case $B_Mute If $Mute Then $Mute = False $Mute_Volume = $Radio.Settings.Volume() $Radio.Settings.Volume() = 0 ;GUICtrlSetState($S_Volume, $GUI_DISABLE) Else $Mute = True $Radio.Settings.Volume() = $Mute_Volume ;GUICtrlSetState($S_Volume, $GUI_ENABLE) EndIf Case $S_Volume If Not($Mute) Then $Mute = True EndSwitch EndIf If $Mute Then $Volume = GUICtrlRead($S_Volume) If $Volume <> $Radio.Settings.Volume() Then $Radio.Settings.Volume() = $Volume EndIf EndIf WEnd
|
|
|
11/04/2010, 20:33
|
#26
|
elite*gold: 0
Join Date: Sep 2009
Posts: 445
Received Thanks: 286
|
Quote:
Originally Posted by maxi39
soundlautstärke mit CE auslesen? xD
€ funktioniert wirklich, grad probiert
|
Hehe, find ich lustig...
Ne mal im Ernst, Autoit kann mehr als Ihr denkt.
SoundSetWaveVolume - Yeah
|
|
|
All times are GMT +2. The time now is 10:05.
|
|