home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Support
General Support
Detect recording in progress from external script (AHK)
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Rob Hexenmeister" data-source="post: 1243373" data-attributes="member: 113164"><p>Well I have come up with something that works. It is very dirty and brutal but does the job. I tried other methods, such as SetThreadExecutionState to no avail - despite the DLL appearing to call and report success, it seemed to have no effect at all.</p><p></p><p>So here is what I have:</p><p></p><p>Three Autohotkey (AHK) Scripts.</p><p></p><p>Wake Up.Exe is called by Task Scheduler, triggered by a power state change message. This therefore kicks in if the computer is woken up from sleep</p><p>Start MP.Exe is scheduled to run at start up and is the "main" controller programme. It is also called by Wake Up.Exe to make sure everything starts afresh on wake.</p><p>Dummy Process.Exe is exactly as it sounds it does nothing. It is run by Start MP if the computer was woken with the power button or switched on by the user. The key is to tell PowerScheduler not to shut down if "Dummy Process" is running and you can do that in the PowerScheduler configuration in TV Server.</p><p></p><p>I include the compiled exe programmes and the ahk scripts for you to examine in notepad. There are other things in those, such as the switching on of my Energenie Sockets and the hiding of the mouse pointer (the latter which I cannot take full credit for at all, I just did the bit which repositions it to where it was when the mouse was disabled)</p><p></p><p>I have left the failed experiments in the scripts as comments, in case anyone can tidy this up and make it work with the DLLs which would be much tidier.</p><p></p><p>The original idea which I would still like to pursue if possible is to detect if TV recording has stopped, and send the PC to sleep if it wasn't switched on with the power button. Sadly, while the AHK DllCall function finds the DLL, it can't find the command that reports if any card is recording. It may be a privileges issue, or maybe it is a 32 bit issue. I just don't know, that is beyond my powers.</p></blockquote><p></p>
[QUOTE="Rob Hexenmeister, post: 1243373, member: 113164"] Well I have come up with something that works. It is very dirty and brutal but does the job. I tried other methods, such as SetThreadExecutionState to no avail - despite the DLL appearing to call and report success, it seemed to have no effect at all. So here is what I have: Three Autohotkey (AHK) Scripts. Wake Up.Exe is called by Task Scheduler, triggered by a power state change message. This therefore kicks in if the computer is woken up from sleep Start MP.Exe is scheduled to run at start up and is the "main" controller programme. It is also called by Wake Up.Exe to make sure everything starts afresh on wake. Dummy Process.Exe is exactly as it sounds it does nothing. It is run by Start MP if the computer was woken with the power button or switched on by the user. The key is to tell PowerScheduler not to shut down if "Dummy Process" is running and you can do that in the PowerScheduler configuration in TV Server. I include the compiled exe programmes and the ahk scripts for you to examine in notepad. There are other things in those, such as the switching on of my Energenie Sockets and the hiding of the mouse pointer (the latter which I cannot take full credit for at all, I just did the bit which repositions it to where it was when the mouse was disabled) I have left the failed experiments in the scripts as comments, in case anyone can tidy this up and make it work with the DLLs which would be much tidier. The original idea which I would still like to pursue if possible is to detect if TV recording has stopped, and send the PC to sleep if it wasn't switched on with the power button. Sadly, while the AHK DllCall function finds the DLL, it can't find the command that reports if any card is recording. It may be a privileges issue, or maybe it is a 32 bit issue. I just don't know, that is beyond my powers. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
General Support
Detect recording in progress from external script (AHK)
Contact us
RSS
Top
Bottom