Hi Leute,
ich habe eine Software für die Original S100 Fernbedienung geschrieben, um den VLC (Video Lan Client) zu steuern.
Die Tasten
* rot
* grün
* gelb
* blau
können über die INI-Datei "Fernbedienung.ini" frei belegt werden.
Eine genaue Belegung der Tasten gibt es unter dem beigefügten PDF.
Das Programm gibt es in der Version 0.2
Fragen, Anregungen und Wünsche könnt ihr ja hier mal posten.
Spoiler anzeigen
;~ Author: <Der_Doc>
;~ Version: <Fernbeienung 0.2>
;~ AutoIt Version: 3.2.2.0
;~ Datum: 15.04.2007
;~ ####### Ini-Datei
Dim $inidatei = "fernbedienung.ini"
$section = IniReadSectionNames(@ScriptDir & "\fernbedienung.ini")
If @error Then
MsgBox(48, "Fehlermeldung von Fernbedienung_S100", "Konnte die Datei ''Fernbedienung.ini'' nicht finden!")
exit
Else
For $i = 1 To $section[0]
$ini = IniReadSection(@ScriptDir&"\"&$inidatei, $section[$i])
;~ For $a = 1 To $ini[0][0]
;~ msgbox(0,$a,$ini[$a][0] & @CRLF & $ini[$a][1])
;~
;~ Next
Next
EndIf
;~ ####### Hotkeys
HotKeySet("{SCROLLLOCK}", "mute") ;~ Mute - 145 0x91 Scr SCROLLLOCK
;~ 1 - 49 0x31 1
;~ 2 - 50 0x32 2
;~ 3 - 51 0x33 3
;~ 4 - 52 0x34 4
;~ 5 - 53 0x35 5
;~ 6 - 54 0x36 6
;~ 7 - 55 0x37 7
;~ 8 - 56 0x38 8
;~ 9 - 57 0x39 9
;~ 0 - 48 0x30 0
;~ * - 100 0x64 4n
;~ # - 102 0x66 6n
HotKeySet("{NUMPAD2}", "tab") ;~ i - 98 0x62 2n Tab {Tab}
HotKeySet("{NUMPAD8}", "epg") ;~ EPG - 104 0x68 8n "^o"
HotKeySet("{BS}", "esc") ;~ C - 8 0x8 BS ESC {Esc}
HotKeySet("{NUMPAD0}", "menu") ;~ MENU - 96 0x60 0n CTRL+o "!d"
HotKeySet("{F1}", "vollbild") ;~ -T- - 112 0x70 F1 f
HotKeySet("{NUMPAD5}", "ende") ;~ Exit - 101 0x65 5n Strg+q "^q"
HotKeySet("{NUMPAD7}", "kap_for") ;~ -> - 103 0x67 7n Strg+d "^d"
HotKeySet("{NUMPAD1}", "kap_back") ;~ <- - 97 0x61 1n Strg+u "^u"
HotKeySet("{NUMPAD9}", "vol_up") ;~ Vol+ - 105 0x69 9n {VOLUME_UP}
HotKeySet("{NUMPAD3}", "vol_down") ;~ Vol- - 99 0x63 3n {VOLUME_Down}
;~ HotKeySet("{UP}", "up") ;~ up - 38 0x26 UP {UP}
;~ HotKeySet("{Down}", "down") ;~ down - 40 0x28 Dow {Down}
;~ HotKeySet("{Left}", "left") ;~ left - 37 0x25 Left {Left}
;~ HotKeySet("{Right}", "right") ;~ right - 39 0x27 Right {Right}
;~ HotKeySet("{Enter}", "ok") ;~ OK - 13 0xd Ent {Enter}
HotKeySet("{F3}", "stop") ;~ stop - 114 0x72 F3 s
HotKeySet("{F4}", "play") ;~ ||/> - 115 0x73 F4 Space
;~ ? - 109 0x6d -
HotKeySet("{F5}", "sprung_l_back") ;~ |<< - 116 0x74 F5 Strg+Left ^!{Left}
HotKeySet("{F6}", "sprung_k_back") ;~ << - 117 0x75 F6 AltLeft ^{Left}
HotKeySet("{F7}", "sprung_k_for") ;~ >> - 118 0x76 F7 Alt+Right ^{Right}
HotKeySet("{F8}", "sprung_l_for") ;~ >>| - 119 0x77 F8 Strg+Right ^!{Right}
HotKeySet("{F9}", "rot") ;~ rot - 120 0x78 F9 Run VLC
HotKeySet("{F10}", "gruen") ;~ gruen - 121 0x79 F10
HotKeySet("{F11}", "gelb") ;~ gelb - 122 0x7a F11
HotKeySet("{F12}", "blau") ;~ blau - 123 0x7b F12
While 1
Sleep(100)
WEnd
;~ ####### Funktionen
Func mute()
Send("{VOLUME_MUTE}")
EndFunc
Func tab()
Send("{Tab}")
EndFunc
Func epg()
Send("^o")
EndFunc
Func esc()
Send("{Esc}")
EndFunc
Func menu()
Send("!d")
EndFunc
Func vollbild()
Send("f")
EndFunc
Func ende()
Send("^q")
EndFunc
Func kap_for()
Send("^d")
EndFunc
Func kap_back()
Send("^u")
EndFunc
Func vol_up()
Send("{VOLUME_up}")
EndFunc
Func vol_down()
Send("{VOLUME_Down}")
EndFunc
;~ Func up()
;~ Send("{Up}")
;~ EndFunc
;~ Func down()
;~ Send("{Down}")
;~ EndFunc
;~ Func left()
;~ Send("{Left}")
;~ EndFunc
;~ Func right()
;~ Send("{Right}")
;~ EndFunc
;~ Func ok()
;~ Send("{Enter}")
;~ EndFunc
Func stop()
Send("s")
EndFunc
Func play()
Send("{Space}")
EndFunc
Func sprung_l_back()
Send("^!{Left}")
EndFunc
Func sprung_k_back()
Send("^{Left}")
EndFunc
Func sprung_k_for()
Send("^{Right}")
EndFunc
Func sprung_l_for()
Send("^!{Right}")
EndFunc
Func rot()
If FileExists($ini[1][1]) Then
ShellExecute($ini[1][1])
Else
MsgBox(4096, "Tasten","Taste "&$ini[1][0]& " noch nicht belegt")
EndIf
EndFunc
Func gruen()
If FileExists($ini[2][1]) Then
ShellExecute($ini[2][1])
Else
MsgBox(4096, "Tasten","Taste "&$ini[2][0]& " noch nicht belegt")
EndIf
EndFunc
Func gelb()
If FileExists($ini[3][1]) Then
ShellExecute($ini[3][1])
Else
MsgBox(4096, "Tasten","Taste "&$ini[3][0]& " noch nicht belegt")
EndIf
EndFunc
Func blau()
If FileExists($ini[4][1]) Then
ShellExecute($ini[4][1])
Else
MsgBox(4096, "Tasten","Taste "&$ini[4][0]& " noch nicht belegt")
EndIf
EndFunc
MfG
Der_Doc