1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. Uwe63

Beiträge von Uwe63

  • Anfänger braucht Hilfe bei DropDown Listen

    • Uwe63
    • 7. April 2019 um 14:05

    Hallo Bitnugger,

    danke für den Hinweis. Wie gesagt, alles Neuland für mich. Nur löst das mein Problem nicht. Warum klappt die automatische Auswahl in der DropDown Liste ID 1410 im TAB "Erweitert" und in der DropDown Liste ID 1600 im TAB "Abhören" nicht? Für beide Listen benutze ich die gleiche Vorgehensweise. Ist mir ein Rätsel. Ich möchte einfach nur beim Benutzer Login automatisch in der DropDown Liste im TAB "Abhören" das Gerät "Lautsprecher (GameDAC Game)" setzen.

  • Anfänger braucht Hilfe bei DropDown Listen

    • Uwe63
    • 7. April 2019 um 13:08

    Ich nochmal. ControlCommand ("[CLASS:ComboBox]", "", 1600, "SelectString", "Lautsprecher (GameDAC Game)") habe ich durch ControlCommand ("[CLASS:#32770]", "", 1600, "SelectString", "Lautsprecher (GameDAC Game)") ersetzt. Ändert leider auch nichts.

  • Anfänger braucht Hilfe bei DropDown Listen

    • Uwe63
    • 7. April 2019 um 12:56

    Hallo alpines,

    erstmal danke für deine Hilfe. Habe deine Vorschläge umgesetzt. Beim Fenstertitel musste ich an einigen Stellen [CLASS:#32770] stehen lassen, da sonst das Fenster nicht geschlossen wurde. K.A. warum. WinWaitDelay habe ich jetzt nur noch einmal drin. Mit den Tabseiten muss ich mich dann nochmal beschäftigen, hat so auf Anhieb nicht funktioniert. Sorry, ist halt alles neu für mich. Leider funktioniert das Skript immer noch nicht. Im TAB "Abhören" die Auswahl in der DropDown Liste nicht. Im TAB "Erweitert" klappt die Auswahl in der DropDown Liste. Dumm ist nur ich benötige die Auswahl im "Abhören" TAB. Die andere ist nur zu Testzwecken. Ich weiß nicht mehr weiter.

    C
    #cs ----------------------------------------------------------------------------
    
     AutoIt Version: 3.3.14.5
     Author:         myName
    
     Script Function:
        Template AutoIt script.
    
    #ce ----------------------------------------------------------------------------
    
    ; Script Start - Add your code below here
    #include <GuiSlider.au3>
    #include <GuiButton.au3>
    
    ;*********************************************
    Func ConfigureStereoMix()
        WinWait("Sound")
    
        Send("^{TAB}")
        WinWait("Sound")
    
        ;TAB "Abhören". Hier klappt das Setzen / Auswahl in der DropDown Liste NICHT
        ControlCommand ("[CLASS:#32770]", "", 1600, "SelectString", "Lautsprecher (GameDAC Game)")
        
        Send("^{TAB}")
        WinWait("Sound")
    
        Send("^{TAB}")
        WinWait("Sound")
    
        Send("^{TAB}")
        WinWait("Sound")
    
        ;TAB "Erweitert". Hier klappt das Setzen / Auswahl in der DropDown Liste. Nur zum Testen wird später entfernt.
        ControlCommand("[CLASS:#32770]", "", 1410, "SelectString", "2 Kanal, 16 Bit, 44100 Hz (CD-Qualität)")
    
    ;Click the Ok button
        ControlClick("[CLASS:#32770]", "", 1)
        WinWait("Sound")
    EndFunc
    ;*********************************************
    
    ;*********************************************
    
    Func SetRecordingDeviceConfig()
    
        Dim $itemCount
        $itemCount = ControlListView("Sound", "", "SysListView321", "GetItemCount")
    ;Loop through items to configure the devices
        For $i = 0 to $itemCount - 1
        ;Select the item
            ControlListView("Sound", "", "SysListView321", "Select", $i)
            WinWait("Sound")
    
        ;Click the properties button to open the dialog and determine the device
            ControlClick("Sound", "", 1003)
            WinWait("[CLASS:#32770]")
    
            Dim $var
        ;Get the string in the editbox
            $var = ControlGetText("[CLASS:#32770]", "", 1201)
            Switch $var
            Case "Stereomix"
                ConfigureStereoMix()
            Case Else
            ;Click Cancel to close the dialog
                ControlClick("[CLASS:#32770]", "", 2)
                WinWait("Sound")
            EndSwitch
        Next
    EndFunc
    
    ;*********************************************
    
    ;*********************************************
    ;Show the sound dialog with the first tab (Playback) selected
    Run("control mmsys.cpl,,0")
    Opt("WinWaitDelay", 1000)
    WinWait("Sound")
    ;*********************************************
    
    ;*********************************************
    ;Move to next tab (Recording) in dialog
    Send("^{TAB}")
    WinWait("Sound")
    ;*********************************************
    
    ;*********************************************
    ;Call the function to set the Recording device configurations
    SetRecordingDeviceConfig()
    ;*********************************************
    
    ;*********************************************
    ;Click the Ok button to close the dialog
    ControlClick("Sound", "", 1)
    ;*********************************************
    Alles anzeigen
  • Anfänger braucht Hilfe bei DropDown Listen

    • Uwe63
    • 7. April 2019 um 01:44

    Hallo,

    ich bin der Uwe, 55 Jahre alt und habe keine Erfahrung was Programmierung, Skripte etc betrifft. Ich möchte mit AutoIt in einer DropDown Liste eigentlich einfach nur einen Eintrag auswählen. Eigentlich ... :)

    Ich bin mit Windows 10 unterwegs und möchte in der Soundeinstellung unter Aufnahme beim Realtek Stereomix (Bild 1) eine Quelle auswählen. Nach langem Suchen und Lesen habe ich in einem Forum ein Skript gefunden und dies mit Trial und Error versucht an meine Bedürfnisse an zu passen.

    C
    #cs ----------------------------------------------------------------------------
    
     AutoIt Version: 3.3.14.5
     Author:         myName
    
     Script Function:
        Template AutoIt script.
    
    #ce ----------------------------------------------------------------------------
    
    ; Script Start - Add your code below here
    #include <GuiSlider.au3>
    #include <GuiButton.au3>
    
    ;*********************************************
    Func ConfigureStereoMix()
        Opt("WinWaitDelay", 1000)
        WinWait("[CLASS:#32770]")
    
        Send("^{TAB}")
        Opt("WinWaitDelay", 1000)
        WinWait("[CLASS:#32770]")
        ;Opt("WinWaitDelay", 1000)
        ;ControlCommand("[CLASS:#32770]", "Dieses Gerät als Wiedergabequelle verwenden", 1601, "Check", "") HIER WIEDER AKTIVIEREN !!!!!
    
        Opt("WinWaitDelay", 1000)
        WinWait("[CLASS:#32770]")
        ;WinActivate("[TITLE:Eigenschaften von Stereomix]", "")
        ;$index = ControlCommand("[CLASS:#32770]", "", 1600, "FindString", "Lautsprecher (GameDAC Game)")
        ;ControlCommand ("[CLASS:#32770]", "", 1600, "ShowDropDown", "")
        ;Opt("WinWaitDelay", 50000)
        ;$test = ControlCommand("Eigenschaften von Stereomix", "", "[CLASS:ComboBox; INSTANCE:1]", "SelectString", "Lautsprecher (GameDAC Game)")
        ;msgbox(0, "test", $test)
        ControlCommand ("[CLASS:ComboBox]", "", 1600, "SelectString", "Lautsprecher")
        ;ControlCommand ("[CLASS:#32770]", "", 1600, "SelectString", "Lautsprecher (GameDAC Game)")
        ;ControlCommand ("[CLASS:ComboBox; INSTANCE:1]", "", 1600, "SelectString", "Lautsprecher (GameDAC Game)")
        ;ControlCommand ( "Eigenschaften von Stereomix", "", 1600, "SelectString", "Lautsprecher (GameDAC Game)")
        ;ControlCommand("[CLASS:#32770]", "", 1600, "SetCurrentSelection", 2);ComboBox1
        ;$hWnd = WinWaitActive("Eigenschaften von Stereomix", "")
        ;ControlCommand($hWnd, "", "[CLASS:ComboBox; INSTANCE:1]", "SelectString", "Lautsprecher (GameDAC Game)")
        Opt("WinWaitDelay", 50000)
    
        Send("^{TAB}")
        Opt("WinWaitDelay", 1000)
        WinWait("[CLASS:#32770]")
    
        Send("^{TAB}")
        Opt("WinWaitDelay", 1000)
        WinWait("[CLASS:#32770]")
    
        Send("^{TAB}")
        Opt("WinWaitDelay", 1000)
        WinWait("[CLASS:#32770]")
    
        ControlCommand("[CLASS:#32770]", "", 1410, "SelectString", "2 Kanal, 16 Bit, 44100 Hz (CD-Qualität)")
    
    ;Click the Ok button
        ControlClick("[CLASS:#32770]", "", 1)
        Opt("WinWaitDelay", 1000)
        WinWait("Sound")
    EndFunc
    ;*********************************************
    
    ;*********************************************
    
    Func SetRecordingDeviceConfig()
    
        Dim $itemCount
        $itemCount = ControlListView("Sound", "", "SysListView321", "GetItemCount")
    ;Loop through items to configure the devices
        For $i = 0 to $itemCount - 1
        ;Select the item
            ControlListView("Sound", "", "SysListView321", "Select", $i)
            Opt("WinWaitDelay", 1000)
            WinWait("Sound")
    
        ;Click the properties button to open the dialog and determine the device
            ControlClick("Sound", "", 1003)
            Opt("WinWaitDelay", 1000)
            WinWait("[CLASS:#32770]")
    
            Dim $var
        ;Get the string in the editbox
            $var = ControlGetText("[CLASS:#32770]", "", 1201)
            Switch $var
            Case "Stereomix"
                ConfigureStereoMix()
            Case Else
            ;Click Cancel to close the dialog
                ControlClick("[CLASS:#32770]", "", 2)
                Opt("WinWaitDelay", 1000)
                WinWait("Sound")
            EndSwitch
        Next
    EndFunc
    
    ;*********************************************
    
    ;*********************************************
    ;Show the sound dialog with the first tab (Playback) selected
    Run("control mmsys.cpl,,0")
    Opt("WinWaitDelay", 1000)
    WinWait("Sound")
    ;*********************************************
    
    ;*********************************************
    ;Move to next tab (Recording) in dialog
    Send("^{TAB}")
    Opt("WinWaitDelay", 1000)
    WinWait("Sound")
    ;*********************************************
    
    ;*********************************************
    ;Call the function to set the Recording device configurations
    SetRecordingDeviceConfig()
    ;*********************************************
    
    ;*********************************************
    ;Click the Ok button to close the dialog
    ControlClick("Sound", "", 1)
    ;*********************************************
    Alles anzeigen

    Checkbox setzen und einen Eintrag in einer anderen DropDown Liste (Bild 3) auswählen klappt wunderbar, nur in dieser DropDown Liste (Bild 2) will es einfach nicht klappen. Es wird nichts ausgewählt bzw. gesetzt. Ich bin ratlos und könnte etwas Hilfe gebrauchen.

    Laut AutoIt Window Info unterscheiden sich beide Listen nur in der ID. Liste die nicht klappt hat die ID 1600 (Bild 1a) und die Liste die klappt hat die ID 1410 (Bild 3a). Sonst kann ich keine Unterschiede finden. Wie im Quellcode zu sehen ist, habe ich mehrere Sachen ausprobiert. Sorry, ich weiß nicht weiter.

    Mit freundlichen Grüssen

    Uwe

    Dateien

    Bild1.jpg 63,28 kB – 0 Downloads Bild1a.jpg 56,53 kB – 0 Downloads Bild2.jpg 71,16 kB – 0 Downloads Bild3.jpg 51,42 kB – 0 Downloads Bild3a.jpg 56,46 kB – 0 Downloads

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™