von ds10 » 09 Nov 2007, 20:50
Die Parameter einer Applikation findest du in den Applikationseinstellungen von WinTVCap_GUI. Du könntest dir auch einen Wrapper mit Autohotkey bauen, der in der Lage ist die Prozesse zu finden und im Notfall auch abschießen zu können.
Dem Radiorecorder liegt auch ein solches Autohotkey-Skript zu Grunde.
Code: Alles auswählen
;
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: A.N.Other <myemail@nowhere.com>
;
; Script Function:
; Template AutoHotkey script.
;
#NoTrayIcon
IniRead, wintv2k, HauppaugeRadioRecorder.ini, programdirs, wintv2k
IniRead, radio, HauppaugeRadioRecorder.ini, programdirs, radio
IniRead, harddiskogg, HauppaugeRadioRecorder.ini, programdirs, harddiskogg
IniRead, sndvol, HauppaugeRadioRecorder.ini, programdirs, sndvol
IniRead, sourceselection, HauppaugeRadioRecorder.ini, soundvalues, sourceselection
IniRead, resetinputto, HauppaugeRadioRecorder.ini, soundvalues, resetinputto
quality := -1
min := -1
seconds := -1
selectinput := -1
Loop, %0%
{
if(%A_Index% = "-cancel")
{
WinShow, HarddiskOgg
IfWinExist, HarddiskOgg
{
Run, %harddiskogg% -quit
}
ExitApp
}
if(%A_Index% = "/channel")
{
index := A_Index + 1
channel := %index%
}
if(%A_Index% = "/file")
{
index := A_Index + 1
file := %index%
}
if(%A_Index% = "/seconds")
{
index := A_Index + 1
seconds := %index%
}
if(%A_Index% = "/preset")
{
index := A_Index + 1
quality := %index%
}
if(%A_Index% = "/minimize")
{
min := 1
}
if(%A_Index% = "/source")
{
selectinput := 1
}
}
IfWinExist, WinTV32
Run, "%wintv2k%" -stopr -mOff
WinWaitClose, WinTV32
if(selectinput = 1)
{
Run, "%sndvol%" -r
Sleep, 1000
Loop, %sourceselection%
Send, {tab}
Send, {space}
Send, !{f4}
}
Run, "%radio%" %channel% radio
Sleep, 5000
if(min = 1)
WinHide, WinTV Radio
if(quality = -1)
{
if(seconds = -1)
RunWait, "%harddiskogg%" -output "%file%" -record -tos -minimize
else
RunWait, "%harddiskogg%" -output "%file%" -record -timelimit %seconds% -tos -minimize
}
else
{
StringGetPos lastBackSpace, harddiskogg, \, R
StringLeft path, harddiskogg, lastBackSpace
if(seconds = -1)
RunWait, "%harddiskogg%" -output "%file%" -record -tos -minimize -preset %quality%.hdp, %path%
else
RunWait, "%harddiskogg%" -output "%file%" -record -timelimit %seconds% -tos -minimize -preset %quality%.hdp, %path%
}
Sleep, 500
WinShow, WinTV Radio
IfWinExist, WinTV Radio
{
WinActivate, WinTV Radio
WinClose, WinTV Radio
}
if(selectinput = 1)
{
Run, "%sndvol%" -r
Sleep, 1000
Loop, %resetinputto%
Send, {tab}
Send, {space}
Send, !{f4}
}
ExitApp
Die Parameter einer Applikation findest du in den Applikationseinstellungen von WinTVCap_GUI. Du könntest dir auch einen Wrapper mit Autohotkey bauen, der in der Lage ist die Prozesse zu finden und im Notfall auch abschießen zu können.
Dem Radiorecorder liegt auch ein solches Autohotkey-Skript zu Grunde.
[code];
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: A.N.Other <myemail@nowhere.com>
;
; Script Function:
; Template AutoHotkey script.
;
#NoTrayIcon
IniRead, wintv2k, HauppaugeRadioRecorder.ini, programdirs, wintv2k
IniRead, radio, HauppaugeRadioRecorder.ini, programdirs, radio
IniRead, harddiskogg, HauppaugeRadioRecorder.ini, programdirs, harddiskogg
IniRead, sndvol, HauppaugeRadioRecorder.ini, programdirs, sndvol
IniRead, sourceselection, HauppaugeRadioRecorder.ini, soundvalues, sourceselection
IniRead, resetinputto, HauppaugeRadioRecorder.ini, soundvalues, resetinputto
quality := -1
min := -1
seconds := -1
selectinput := -1
Loop, %0%
{
if(%A_Index% = "-cancel")
{
WinShow, HarddiskOgg
IfWinExist, HarddiskOgg
{
Run, %harddiskogg% -quit
}
ExitApp
}
if(%A_Index% = "/channel")
{
index := A_Index + 1
channel := %index%
}
if(%A_Index% = "/file")
{
index := A_Index + 1
file := %index%
}
if(%A_Index% = "/seconds")
{
index := A_Index + 1
seconds := %index%
}
if(%A_Index% = "/preset")
{
index := A_Index + 1
quality := %index%
}
if(%A_Index% = "/minimize")
{
min := 1
}
if(%A_Index% = "/source")
{
selectinput := 1
}
}
IfWinExist, WinTV32
Run, "%wintv2k%" -stopr -mOff
WinWaitClose, WinTV32
if(selectinput = 1)
{
Run, "%sndvol%" -r
Sleep, 1000
Loop, %sourceselection%
Send, {tab}
Send, {space}
Send, !{f4}
}
Run, "%radio%" %channel% radio
Sleep, 5000
if(min = 1)
WinHide, WinTV Radio
if(quality = -1)
{
if(seconds = -1)
RunWait, "%harddiskogg%" -output "%file%" -record -tos -minimize
else
RunWait, "%harddiskogg%" -output "%file%" -record -timelimit %seconds% -tos -minimize
}
else
{
StringGetPos lastBackSpace, harddiskogg, \, R
StringLeft path, harddiskogg, lastBackSpace
if(seconds = -1)
RunWait, "%harddiskogg%" -output "%file%" -record -tos -minimize -preset %quality%.hdp, %path%
else
RunWait, "%harddiskogg%" -output "%file%" -record -timelimit %seconds% -tos -minimize -preset %quality%.hdp, %path%
}
Sleep, 500
WinShow, WinTV Radio
IfWinExist, WinTV Radio
{
WinActivate, WinTV Radio
WinClose, WinTV Radio
}
if(selectinput = 1)
{
Run, "%sndvol%" -r
Sleep, 1000
Loop, %resetinputto%
Send, {tab}
Send, {space}
Send, !{f4}
}
ExitApp[/code]