wedok Posted May 31, 2016 Share Posted May 31, 2016 Ich wünsch mir sehnlichst mit einer Tasteneingabe zwischen mindestens zwei oder besser noch mehr Aktionen hin- und herschalten zu können. Drücke ich die Taste einmal, wird die AktionA ausgeführt. Drücke ich die Taste ein weiteres mal, wird die AktionB ausgeführt. Drücke ich die Taste ein drittes mal, wird wieder die AktionA ausgeführt. Und immer so weiter. Quote Link to comment
Tjod Posted May 31, 2016 Share Posted May 31, 2016 Das kannst du dir mit Command.vbs basteln. http://de.DVBViewer.tv/wiki/Command.vbs Das heißt du musst mit dem Script irgendwo den Status ablegen und in Abhängigkeit vom Status dann unterschiedliche Aktionen an den DVBViewer schicken. Eine extra Lösung direkt im DVBViewer würde ich dafür nicht erwarten. Das ist schon recht speziell. Und über Command.vbs gibt es ja schon einen weg für alle möglichen extra Geschichten.. Quote Link to comment
wedok Posted May 31, 2016 Author Share Posted May 31, 2016 (edited) ich raff nix. so sieht meine command.vbs zur zeit aus: sub main(ActionID) Select Case ActionID Case 20480Set WshShell = CreateObject("WScript.Shell")WshShell.RegWrite "HKCU\Software\ReClock\Config\DirectSoundDeviceID","Realtek HDA HDMI Out", "REG_SZ" Case 20481Set WshShell = CreateObject("WScript.Shell")WshShell.RegWrite "HKCU\Software\ReClock\Config\DirectSoundDeviceID","ASUS Xonar U3 Audio Device", "REG_SZ" Case Else 'Bei allen anderen ActionIDs osd.showInfoinTVpic "No action in the Command.vbs for the ActionID " & ActionID,1000 'Zeige die Text Information No action in the Command.vbs for the ActionID (ActionID) 'für 1000 Millisekunden im DVBViewer an. End Selectend sub ich möchte beim 1. tastendruck "20480" ausführen und beim weiteren tastendruck "20481" und danach wieder "20480", usw. kannst du mir dabei helfen ? Edited May 31, 2016 by wedok Quote Link to comment
Tjod Posted May 31, 2016 Share Posted May 31, 2016 Das ist der Falsche Ansatz, wenn du die Taste drückst die ActionID 20480 aufruft wird immer ActionID 20480 aufgerufen. Das heißt pro taste brauchst du da nur Case. Was du da machst wird aber um einiges Komplizierter. Da musst erst mal irgendwo extern einen Zähler setzen. Oder in dem Fall den Regestry Schlüssel auslesen und dann in Abhängigkeit vom vorhandenen Wert eine im Script eine andere Aktion ausführen lassen. if Wert 1 then ... elseif Wert 2 then... Aber mit VB Scripten kenne ich mich nicht wirklich aus. Da muss entweder jemand anders weiter helfen oder du musst dir das aus VB Tutorials zusammensuchen. Quote Link to comment
wedok Posted May 31, 2016 Author Share Posted May 31, 2016 (edited) ich glaubs ja nich. das erste mal das ich was code mässiges verstanden hab. und dann noch so schnell: sub main(ActionID) Select Case ActionID Case 20480Dim objShell, strValueSet objShell = CreateObject("WScript.Shell")strValue = objShell.RegRead("HKCU\Software\ReClock\Config\DirectSoundDeviceID")If strValue = "Realtek HDA HDMI Out" thenobjShell.RegWrite "HKCU\Software\ReClock\Config\DirectSoundDeviceID","ASUS Xonar U3 Audio Device", "REG_SZ"osd.showInfoinTVpic "ASUS Xonar U3 Audio Device",2000ElseobjShell.RegWrite "HKCU\Software\ReClock\Config\DirectSoundDeviceID","Realtek HDA HDMI Out", "REG_SZ"osd.showInfoinTVpic "Realtek HDA HDMI Out",2000End If Case Else 'Bei allen anderen ActionIDs osd.showInfoinTVpic "No action in the Command.vbs for the ActionID " & ActionID,1000 'Zeige die Text Information No action in the Command.vbs for the ActionID (ActionID) 'für 1000 Millisekunden im DVBViewer an. End Selectend sub Edited May 31, 2016 by wedok Quote Link to comment
BALOU Posted May 31, 2016 Share Posted May 31, 2016 (edited) mit EG sollte das problemlos gehen in der Art 2 Macros anlegen wenn du 20480 aufrufst findet die Aktion statt und der Macro 20480 wird deaktiviert und der Macro 20481 wird aktiviert und halt andersrum. na wenn du es mit der command.vbs hinbekommen hast noch besser. Edited May 31, 2016 by BALOU Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.