dbraner Posted November 30, 2008 Share Posted November 30, 2008 (edited) Hi, I'm using AutoIT V3 for controlling of my HTPC. With the following code it's easy to send a command to the DVBViewer: $DVBViewer = ObjGet ("", "DVBViewerServer.DVBViewer") If $DVBViewer = 0 Then MsgBox (1, "DVBVCommand", "DVBViewer not running") Else $DVBViewer.SendCommand ($Code) EndIf Just substitute $Code with a valid code from actions.ini file. Link to AutoIT: http://www.autoitscript.com/autoit3/ Best, Dirk Edited November 30, 2008 by dbraner Quote Link to comment
klausb Posted December 3, 2008 Share Posted December 3, 2008 Sounds interesting. What in particular are you doing with AutoIT? Does it read the remote control commands? klaus. Quote Link to comment
nuts Posted December 4, 2008 Share Posted December 4, 2008 (edited) very interesting, thx. is it possible to receive com events from DVBViewer with autoit? perhaps you have a script example for this too? Edited December 4, 2008 by nuts Quote Link to comment
dbraner Posted December 5, 2008 Author Share Posted December 5, 2008 It's possible to handle COM events with AutoII. There is a function called ObjEvent. With AutoIT installation comes a help file. See the example code in function reference for ObjEvent. very interesting, thx. is it possible to receive com events from DVBViewer with autoit? perhaps you have a script example for this too? Quote Link to comment
dbraner Posted December 5, 2008 Author Share Posted December 5, 2008 It doesn't read remote control commands. I'm using it for controlling the launch of some programs when my pc is starting or waking up from standby together with HibernateTrigger. In addition mapping network drives from my NAS and some other functions. With one script i'm starting DVBViewer and wating for windows message WM_QUERYENDSESSION. When message is arriving (if user pressing the power button on my PC) the script is closing DVBViewer and the pc ist going down. Normally DVBViewer is stopping the power down if it's running. Only solution is to start the DVB scheduler. Sample: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global const $WM_QUERYENDSESSION = 0x0011 Func HandleShutdown ($hwndGUI, $MsgId, $WParam, $LParam) If $MsgId = $WM_QUERYENDSESSION Then ProcessClose ("DVBViewer.exe") EndIf Return $GUI_RUNDEFMSG EndFunc Run ("C:\Programme\DVBViewer\DVBViewer.exe", "C:\Programme\DVBViewer") GUICreate ("DVBLauncher", 200, 200) GUISetState (@SW_MINIMIZE) GUIRegisterMsg ($WM_QUERYENDSESSION, "HandleShutdown") While 1 $msg = GUIGetMsg () If $msg = $GUI_EVENT_CLOSE Then ExitLoop Sleep (10) WEnd GUIDelete () Sounds interesting. What in particular are you doing with AutoIT? Does it read the remote control commands? klaus. 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.