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. stayawayknight

Beiträge von stayawayknight

  • praktischer Musikplayer

    • stayawayknight
    • 6. Mai 2010 um 18:40

    ah ok achso... :)
    Aber ich glaub so ist es trotzdem besser :D

  • praktischer Musikplayer

    • stayawayknight
    • 6. Mai 2010 um 18:31

    So... hab dann das mit der Einstellungsmöglichkeit fertig... speichert die gewünschten Hotkeys in einer ini ab und ruft diese beim Programmstart automatisch ab.
    Die Einstellungshotkey lässt sich nicht verändern, da man die sonst nimmer findet wenn man alles verändert...

    Vielen Dank dabei an Alizame, der die Zufallsfunktion geschrieben hat und auch vielen Dank an Schnitzel, der mir eine Frage wegen Variabeln in Hotkeys beantwortet hat.

    So das ist der Wiedergabelistenersteller:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    $count = 1
    $file = @WindowsDir
    $countr = 1
    $i = 0
    $f = 0
    Dim $read[500]

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $form = GUICreate("RemiXXer by stay", 625, 443, 193, 125)
    $list = GUICtrlCreateList("", 40, 96, 377, 188)
    $load = GUICtrlCreateButton("Neuen Song laden", 440, 112, 129, 41, 0)
    $label1 = GUICtrlCreateLabel("RemiXXer", 72, 0, 304, 84)
    GUICtrlSetFont(-1, 70, 400, 0, "MS Sans Serif")
    $delete = GUICtrlCreateButton("Liste löschen", 440, 168, 129, 41, 0)
    $run = GUICtrlCreateButton("Start Player!", 440, 224, 129, 41, 0)
    $exit = GUICtrlCreateButton("Exit", 440, 368, 129, 41, 0)
    $loadoldlist = GUICtrlCreateButton("Alte Liste laden", 100, 368, 129, 41, 0)
    GUISetState(@SW_SHOW)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1
    $msg = GUIGetMsg()
    Switch $msg
    Case $GUI_EVENT_CLOSE
    ex()

    [/autoit] [autoit][/autoit] [autoit]

    Case $delete
    delete()

    [/autoit] [autoit][/autoit] [autoit]

    Case $load
    load()

    [/autoit] [autoit][/autoit] [autoit]

    Case $exit
    ex()

    [/autoit] [autoit][/autoit] [autoit]

    Case $run
    run("playcatcher.exe")
    Exit

    [/autoit] [autoit][/autoit] [autoit]

    Case $loadoldlist
    loadold()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func load()
    if FileExists("playlist.ini") Then
    FileDelete("playlist.ini")
    EndIf
    $file = FileOpenDialog("Titel hinzufügen", $file, "Sounddateien (*.mp3;*.wma;*.wav)")
    IniWrite(@ScriptDir & "\playlist.ini", "Playlist", $count, $file)
    GUIctrlsetdata($list, $file)

    [/autoit] [autoit][/autoit] [autoit]

    $count = $count + 1

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func loadold()
    While 1
    $i = $i + 1 ; für auslesearray
    $f = $f + 1 ;
    $read[$i] = IniRead("playlist.ini", "Playlist", $f, "")
    if $read[$i] = "" Then
    ExitLoop
    Else
    GUICtrlSetData($list, $read[$i])
    EndIf
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func delete()
    GUICtrlSetData($list, "")
    FileDelete("playlist.ini")
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func ex()
    MsgBox(0, "Auf Wiedersehen!", "Auf Wiedersehen, bis zum nächsten Mal! By stayawayknight")
    Exit

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc
    ;Benötigt playcatcher.exe!

    [/autoit] [autoit][/autoit] [autoit][/autoit]

    Und das der Player:

    Spoiler anzeigen
    [autoit]

    #include <Sound.au3>
    #include <GUIConstants.au3>

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $playk = "p"
    $stopk = "s"
    $nextk = "n"
    $endk = "e"
    $backk = "b"
    $volumek = "v"
    $zufallk = "z"

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    if Not FileExists("hotkeys.remix") Then
    IniWrite("hotkeys.remix", "Hotkeys", "play", $playk)
    IniWrite("hotkeys.remix", "Hotkeys", "stop", $stopk)
    IniWrite("hotkeys.remix", "Hotkeys", "next", $nextk)
    IniWrite("hotkeys.remix", "Hotkeys", "end", $endk)
    IniWrite("hotkeys.remix", "Hotkeys", "back", $backk)
    IniWrite("hotkeys.remix", "Hotkeys", "volume", $volumek)
    IniWrite("hotkeys.remix", "Hotkeys", "zufall", $zufallk)

    [/autoit] [autoit][/autoit] [autoit]

    Else

    [/autoit] [autoit][/autoit] [autoit]

    $playk = IniRead("hotkeys.remix", "Hotkeys", "play", "")
    $stopk = IniRead("hotkeys.remix", "Hotkeys", "stop", "")
    $nextk = IniRead("hotkeys.remix", "Hotkeys", "next", "")
    $endk = IniRead("hotkeys.remix", "Hotkeys", "end", "")
    $backk = IniRead("hotkeys.remix", "Hotkeys", "back", "")
    $volumek = IniRead("hotkeys.remix", "Hotkeys", "volume", "")
    $zufallk = IniRead("hotkeys.remix", "Hotkeys", "zufall", "")

    [/autoit] [autoit][/autoit] [autoit]

    EndIf

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    HotkeySet("!{" & $playk & "}", "play")
    HotKeySet("!{" & $stopk & "}", "stop")
    HotKeySet("!{" & $nextk & "}", "nexts")
    HotKeySet("!{" & $endk & "}", "ende")
    HotKeySet("!{" & $backk & "}", "back")
    HotKeySet("!{" & $volumek & "}", "volume")
    HotKeySet("!{" & $zufallk & "}", "zufall")
    HotkeySet("!{w}", "settings")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $settingwindow = GUICreate("Einstellungen", 625, 416, 193, 125)
    $play = GUICtrlCreateInput("", 160, 24, 137, 21)
    $stop = GUICtrlCreateInput("", 160, 64, 137, 21)
    $next = GUICtrlCreateInput("", 160, 104, 137, 21)
    $ende = GUICtrlCreateInput("", 160, 141, 137, 21)
    $back = GUICtrlCreateInput("", 160, 182, 137, 21)
    $volume = GUICtrlCreateInput("", 160, 221, 137, 21)
    $zufall = GUICtrlCreateInput("", 160, 257, 137, 21)
    $Label1 = GUICtrlCreateLabel("Playtaste: alt +", 56, 24, 80, 17)
    $Label2 = GUICtrlCreateLabel("Stoptaste: alt +", 56, 65, 80, 17)
    $Label3 = GUICtrlCreateLabel("Nexttaste: alt +", 56, 105, 80, 17)
    $Label4 = GUICtrlCreateLabel("Endetaste: alt +", 56, 142, 80, 17)
    $Label5 = GUICtrlCreateLabel("Backtaste: alt +", 56, 184, 80, 17)
    $Label6 = GUICtrlCreateLabel("Vol. -taste: alt +", 56, 218, 80, 17)
    $Label7 = GUICtrlCreateLabel("Zufallstaste: alt +", 56, 254, 80, 17)
    $Label8 = GUICtrlCreateLabel($playk & " (momentan)", 344, 24, 80, 17)
    $Label9 = GUICtrlCreateLabel($stopk & " (momentan)", 344, 70, 80, 17)
    $Label10 = GUICtrlCreateLabel($nextk & " (momentan)", 344, 107, 80, 17)
    $Label11 = GUICtrlCreateLabel($endk & " (momentan)", 344, 149, 80, 17)
    $Label12 = GUICtrlCreateLabel($backk & " (momentan)", 344, 183, 80, 17)
    $Label13 = GUICtrlCreateLabel($volumek & " (momentan)", 344, 223, 80, 17)
    $Label14 = GUICtrlCreateLabel($zufallk & " (momentan)", 344, 258, 80, 17)
    $okbutton = GUICtrlCreateButton("Speichern", 257, 345, 129, 41, 0)
    GUISetState(@SW_Hide)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $a = 0 ; bewirkt die untilschleife und bricht play1 ab, wenn next kommt
    $count = 1 ; zählt songs

    [/autoit] [autoit][/autoit] [autoit]

    $vol = 75

    [/autoit] [autoit][/autoit] [autoit]

    Msgbox(0, "Start", "Folgende Hotkeys sind wichtig: Alt+" & $playk & " = Play, Alt+" & $stopk & " = Stop, Alt+" & $nextk & " = Next Song , Alt+" & $backk & " = Song Back, Alt+" & $volumek & " = Volume, Alt+" & $zufallk & " = Zufallsmodus, Alt+W = Einstellungsmenü und Alt+" & $endk & " = Ende.")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func play()

    [/autoit] [autoit][/autoit] [autoit]

    Do

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $file = IniRead("playlist.ini", "Playlist", $count, "")
    $lengh = _SoundLength ($file, 2)
    SoundPlay($file)
    ToolTip("Play")
    Sleep(2000)
    ToolTip("")
    Sleep($lengh)
    $count = $count + 1

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Until $a = 1

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func ende()
    Tooltip("Ende, wird beendet ...")
    Sleep(2000)
    Exit

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func volume()

    [/autoit] [autoit][/autoit] [autoit]

    $vol = Inputbox("Lautstärke", "Gib die gewünschte Lautstärke (1-100) ein! Momentan: " & $vol)
    SoundSetWaveVolume($vol)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func stop()
    Run("playcatcher.exe")
    Exit
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func nexts()
    $a = 1
    $count = $count + 1
    ToolTip("Next")
    Sleep(2000)
    play()
    $a = 0
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func back()
    $a = 1
    $count = $count - 1
    ToolTip("Back")
    Sleep(2000)
    play()
    $a = 0
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func zufall ()
    Do
    $file = IniRead("playlist.ini", "Playlist", Random( 1, _FileCountLines("playlist.ini"),1) , "")
    $lengh = _SoundLength ($file, 2)
    SoundPlay($file)
    ToolTip("Play")
    Sleep(2000)
    ToolTip("")
    Sleep($lengh)
    $count = $count + 1
    Until $a = 1
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func settings()
    GUISetState(@SW_SHOW)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $msg = GuiGetMsg()
    Select
    Case $msg = $okbutton

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $playk = GUICtrlRead($play)
    $stopk = GUICtrlRead($stop)
    $nextk = GUICtrlRead($next)
    $endk = GUICtrlRead($ende)
    $backk = GUICtrlRead($back)
    $volumek = GUICtrlRead($volume)
    $zufallk = GUICtrlRead($zufall)

    [/autoit] [autoit][/autoit] [autoit]

    IniWrite("hotkeys.remix", "Hotkeys", "play", $playk)
    IniWrite("hotkeys.remix", "Hotkeys", "stop", $stopk)
    IniWrite("hotkeys.remix", "Hotkeys", "next", $nextk)
    IniWrite("hotkeys.remix", "Hotkeys", "end", $endk)
    IniWrite("hotkeys.remix", "Hotkeys", "back", $backk)
    IniWrite("hotkeys.remix", "Hotkeys", "volume", $volumek)
    IniWrite("hotkeys.remix", "Hotkeys", "zufall", $zufallk)

    [/autoit] [autoit][/autoit] [autoit]

    ToolTip("Gespeichert, aktuellisiere ... ")
    Sleep(2000)

    [/autoit] [autoit][/autoit] [autoit]

    Run("playcatcher.exe")
    Exit

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    EndSelect
    WEnd
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    WEnd

    [/autoit]

    Viel Spaß damit, für Kritik immer offen :)

  • Script zum Klammern entfernen

    • stayawayknight
    • 6. Mai 2010 um 15:35

    jap ist auch (so wie ich finde) um einiges praktischer

  • Gui Fenster schließt sich ganze zeit

    • stayawayknight
    • 6. Mai 2010 um 08:54

    wär vll. hilfreich wenn du dein jetziges script noch einmal posten würdest, dann weiß man wie' s steht etc.

  • Bester Avatar

    • stayawayknight
    • 6. Mai 2010 um 08:52

    verdammt das Ding ist ja schon alt!

  • Gui Fenster schließt sich ganze zeit

    • stayawayknight
    • 6. Mai 2010 um 08:47

    ändere das:

    [autoit]

    While 1
    $msg = GUIGetMsg()

    If $msg = $GUI_EVENT_CLOSE Then Exit
    WEnd

    [/autoit]

    mal in das um:

    [autoit]


    While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
    Exit


    EndSelect
    WEnd

    [/autoit]

    ist übersichtlicher falls du noch mehr Funktionen einbauen willst

  • Sportarten

    • stayawayknight
    • 6. Mai 2010 um 08:44

    OK,
    @Ubuntu: Nein, ich meine halt das ich sonst verdammt viel noch aufzählen müsste wenn man für jede Sportart den Namen hinschreibt... Und außerdem würden kaum welche dafür stimmen..

  • _TCP_File

    • stayawayknight
    • 6. Mai 2010 um 08:38

    Ja, sehr nützlich! 8)

  • Bei Programmstart Script mitstarten

    • stayawayknight
    • 6. Mai 2010 um 08:35

    Kopier das programm doch in den Autostartordner mit folgendem Befehl:

    [autoit]

    FileCopy("PfadzumProgramm", @StartupDir) ; Kopiert den angegebenen Pfad in den Autostartordner (der ist irgendwo als versteckter Ordner gespeichert)

    [/autoit]
  • Browser /URL öffnen

    • stayawayknight
    • 6. Mai 2010 um 08:28

    das wurde irgendwie schon sehr oft hier gefragt vor allem wenn man unten mal bei "ähnliche Themen" schaut :D

    PS: Willkommen hier!

  • Tastenreihenfolge blockieren

    • stayawayknight
    • 6. Mai 2010 um 08:25

    aber normal werden doch die entsprechenden Hotkeyfunktionen für andere Programme solange geblockt, bis Autoit sie nicht mehr benötigt, oder?

  • _IsPressed

    • stayawayknight
    • 6. Mai 2010 um 08:23

    Es gibt nur zurück ob die angegebene Taste gedrückt wurde

  • Piepen soll es

    • stayawayknight
    • 6. Mai 2010 um 08:20

    also falls das Beep über Systemlautsprechern abgespielt wird, kann man da die Lautstärke nicht regulieren, soweit ich weiß..
    Bei mir wird das Beep aber nicht über Systemlautsprecher sondern die normalen Hardwarelautsprecher abgespielt...
    Da kann man dann die Lautstärke regulieren, hab mir mal ne Klaviatur gebaut, ist lustig :)

  • Tastenreihenfolge blockieren

    • stayawayknight
    • 5. Mai 2010 um 22:10

    zur sinnvollen Anwendung: Könnte mir da durchaus etwas vorstellen, z.B. wenn man versehehntlich immer eine bestimmte Kombination drückt, die dann eine unerwünschte Aktion
    auslöst, ist die Frage wie oft das vorkommt...
    Ist nicht so schmerzhaft wie die Bügeleisenvariante :D

  • Zeichnen mit Autoit

    • stayawayknight
    • 5. Mai 2010 um 20:50

    ich glaub das war eins wo einer in Paint gezeichnet hat, also per bot

  • Variable in Hotkeys?

    • stayawayknight
    • 5. Mai 2010 um 20:45

    Danke an alle! Besonders an Schnitzel, habt mir sehr geholfen! => Problem gelöst

  • Variable in Hotkeys?

    • stayawayknight
    • 5. Mai 2010 um 20:04

    ok danke... _ispressed hilft mir in dem fall nicht weiter, aber trotzdem mal danke....
    ist jetzt auch egal ist nicht sonderlich wichtig

  • Sportarten

    • stayawayknight
    • 5. Mai 2010 um 19:53

    sollte ich auch eintragen aber da muss ein übergeordneter begriff her ...

  • SEP, SoundEffektPlayer

    • stayawayknight
    • 5. Mai 2010 um 19:49

    japp echt nett :) und irgendwie auch lustig

  • Variable in Hotkeys?

    • stayawayknight
    • 5. Mai 2010 um 19:43

    Hallo!
    Ich habe eine Frage und zwar: Ist es möglich eine Variable in ein Hotkey einzubauen? Also in etwa so:

    [autoit]

    $key = "F1"
    HotKeySet("!{$key}")

    [/autoit]


    Nur tut das so noch nicht, weil das ja in "..." steht.
    Hat jemand ne Idee? Glaub nicht das das allzu schwer ist, nur komm ich nicht drauf ?(
    Wär nett wenn mir jemand helfen könnte!

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™