dgian Posted September 13, 2021 Share Posted September 13, 2021 As the title says, is there a direct command to change the channel (id or number) with a script? (I don't want to use the ExecNewProcess passing the -c command with channel number or the ? with the id because it is too slow for my purpose) And if possible, after waiting x seconds returning to the last viewed one (if there is a direct command for it too)... Thank you in advance. Quote Link to comment
nuts Posted September 14, 2021 Share Posted September 14, 2021 Should be no problem to use DVBViewer COM interface (documentation you can download in membersarea) with vbs. Maybe this helps (in german): https://de.dvbviewer.tv/wiki/DVBViewer_VBScripte Quote Link to comment
dgian Posted September 14, 2021 Author Share Posted September 14, 2021 (edited) Thanks for answering. Of course i mean using the com interface but what are the exact two commands that I need? Searching all over the com interface chm, I can't find out what command does what I want. Now I have something like this: option explicit dim myDVBViewer dim myOSD Dim var1, var2 var1 = "-cPiso:3758096384" var2 = "-x63" sub main() Set myDVBViewer = GetObject(, "DVBViewerServer.DVBViewer") Set myOSD = myDVBViewer.OSD myOSD.ExecNewProcess "C:\Program Files (x86)\DVBViewer\DVBViewer.exe", var1, True, False myOSD.ExecNewProcess "C:\Program Files (x86)\DVBViewer\DVBViewer.exe", var2, True, False end sub main But I don't want to use .ExecNewProcess because it's too slow for my purposes. So is there something that a) just changes channel and b) returns to last one. Thank you. Edited September 14, 2021 by dgian Quote Link to comment
Griga Posted September 15, 2021 Share Posted September 15, 2021 vor 5 Stunden schrieb dgian: Searching all over the com interface chm, I can't find out what command does what I want. I can't find it either in the DVBViewer code. It seems that channel switching has never been implemented in the COM interface, because it was already covered by command line parameters. Quote Link to comment
Webturtle Posted September 15, 2021 Share Posted September 15, 2021 Hi there, I use an AutoHotkey script to automatically save teletext pages and EPG from different broadcasters. The script tunes the various stations according to a list and then saves the teletext after a while. AutoHotkey comes with a Macrorecoder that records key presses and mouse actions. This can then be transferred to a macro. The macros can be compiled to exe-files. You can download the program here: https://autohotkey.com/download/ A simpler script to tune different channels to update the EPG is Tune_DVBViewer.ahk: Spoiler duration :=0 if %0% = 0 { MsgBox, , EPG-Update, EPG-Update completed! return } Traytip, DBViewer EPG-Scan, Read in new station!, 5, 1 ;WinWait, DVBViewer, IfWinNotActive, DVBViewer, , WinActivate, DVBViewer, WinWaitActive, DVBViewer, MouseClick, left, 158, 195 Sleep, 100 Send, %1% if %2% { duration = %2% Sleep, duration * 1000 } else { Sleep, 30000 } return The call is Tune_DVBViewer [station number according to the station list] [duration in seconds] Best regards Webturtle Quote Link to comment
dgian Posted September 19, 2021 Author Share Posted September 19, 2021 Thank you both, for your answers, as i was absent for a few days I just read them... On 9/15/2021 at 7:14 AM, Griga said: channel switching has never been implemented in the COM interface That's good news for me, at least I'm not crazy not blind... On 9/15/2021 at 7:14 AM, Griga said: already covered by command line parameters but command line parameters and scripting are two totally different processes...and channel switching, so I thought, it's one of the most simple, basic commands that should have been implemented from the very beginning...anyway... Webturtle, thanks for the AutoHotkey script and I'm going to test it as long as there is no other way (simple one...) to see if it's faster than mine. Best regards, dgian Quote Link to comment
Delphi Posted September 20, 2021 Share Posted September 20, 2021 The COM interface IDVBViewer has a property CurrentChannelNr which tunes the channel. In the Delphi programming language it could look like FDVBViewer.CurrentChannelNr := No; // No is the channel number to tune. FDVBViewer is an initialized variabel (interface) of type IDVBViewer. Quote Link to comment
dgian Posted September 22, 2021 Author Share Posted September 22, 2021 YES! THANK YOU DELPHI ! So, with "CurrentChannelNr" you CAN change channel through Com interface. (The change is instantly!) Thank you everyone for your help, and especially Delphi of course. Best regards, dgian 1 Quote Link to comment
dgian Posted September 23, 2021 Author Share Posted September 23, 2021 And the script for whoever... option explicit Sub MyDelay(NumberOfSeconds) Dim DateTimeResume DateTimeResume= DateAdd("s", NumberOfSeconds, Now()) Do Until (Now() > DateTimeResume) Loop End Sub sub main() dim myDVBViewer dim LastCh Set myDVBViewer = GetObject(, "DVBViewerServer.DVBViewer") LastCh = myDVBViewer.CurrentChannelNr myDVBViewer.CurrentChannelNr = 926 MyDelay(10) myDVBViewer.CurrentChannelNr = LastCh end sub main 1 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.