Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 10:05

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



"if" mehrere Befehle...

Discussion on "if" mehrere Befehle... within the AutoIt forum part of the Coders Den category.

Reply
 
Old 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"15585)
GUISetBkColor(0xFFFFFF)
GUICtrlCreateLabel("Passwort:"10105017)
$I_Passwort GUICtrlCreateInput(""103013521BitOR($ES_PASSWORD,$ES_AUTOHSCROLL))
$B_OK GUICtrlCreateButton("OK"105513525)

$Form2 GUICreate("Titel"15590)
GUISetBkColor(0xFFFFFF)
$B_Play GUICtrlCreateButton("Play"10106525)
$B_Stop GUICtrlCreateButton("Stop"80106525)
GUICtrlCreateLabel("Lautstärke:"10455717)
$S_Volume GUICtrlCreateSlider(106013525)
GUICtrlSetData(-150)
GUICtrlSetBkColor(-10xFFFFFF)
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 
KDeluxe is offline  
Old 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:


??
eagly200 is offline  
Old 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.
KDeluxe is offline  
Old 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.
eagly200 is offline  
Old 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 = "").
KDeluxe is offline  
Old 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...
eagly200 is offline  
Old 11/03/2010, 20:50   #22
 
ZaZiZu's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 832
Received Thanks: 136
Quote:
Originally Posted by eagly200 View Post
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
ZaZiZu is offline  
Old 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 View Post
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"15585)
GUISetBkColor(0xFFFFFF)
GUICtrlCreateLabel("Passwort:"10105017)
$I_Passwort GUICtrlCreateInput(""103013521BitOR($ES_PASSWORD,$ES_AUTOHSCROLL))
$B_OK GUICtrlCreateButton("OK"105513525)

$Form2 GUICreate("Titel"15590)
GUISetBkColor(0xFFFFFF)
$B_Play GUICtrlCreateButton("Play"10106525)
$B_Stop GUICtrlCreateButton("Stop"80106525)
GUICtrlCreateLabel("Lautstärke:"10455717)
$S_Volume GUICtrlCreateSlider(106013525)
GUICtrlSetData(-150)
GUICtrlSetBkColor(-10xFFFFFF)
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 
KDeluxe is offline  
Thanks
1 User
Old 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.
eagly200 is offline  
Old 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"15585)
GUISetBkColor(0xFFFFFF)
GUICtrlCreateLabel("Passwort:"10105017)
$I_Passwort GUICtrlCreateInput(""103013521BitOR($ES_PASSWORD,$ES_AUTOHSCROLL))
$B_OK GUICtrlCreateButton("OK"105513525)

$Form2 GUICreate("Radio"15590, -1, -1, -1$WS_EX_TOPMOST)
GUISetBkColor(0xFFFFFF)
$B_Play GUICtrlCreateButton("Play"10106525)
$B_Stop GUICtrlCreateButton("Stop"80106525)
GUICtrlCreateLabel("Lautstärke:"10456017)
$B_Mute GUICtrlCreateButton("Mute"80356525)
$S_Volume GUICtrlCreateSlider(106013525)
GUICtrlSetData(-150)
GUICtrlSetBkColor(-10xFFFFFF)
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($MuteThen $Mute True
        
EndSwitch
    EndIf

    If 
$Mute Then
        $Volume 
GUICtrlRead($S_Volume)
        If 
$Volume <> $Radio.Settings.Volume() Then
            $Radio
.Settings.Volume() = $Volume
        
EndIf
    EndIf
WEnd 
KDeluxe is offline  
Old 11/04/2010, 20:33   #26
 
elite*gold: 0
Join Date: Sep 2009
Posts: 445
Received Thanks: 286
Quote:
Originally Posted by maxi39 View Post
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
Banana.Crafts is offline  
Reply


Similar Threads Similar Threads
Kann mir bitte jemmand eine Hmachi HP erstellen """""SOS HELP""""
09/15/2010 - Metin2 Private Server - 11 Replies
SO wie der Titel schon sagt ich suche einen der mir per Teamviwer eine hp machen kann habe schon alles ausprobiert aber es klappt nie!!!! PLS HELP...



All times are GMT +2. The time now is 10:05.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.