[Implemented] Disable screensaver when lister plays video
Moderators: Hacker, petermad, Stefan2, white
[Implemented] Disable screensaver when lister plays video
It's an obvious feature missing in a new media player: When playing video, screensaver should be disabled. Disabling of other power saving options (standby, hibernate on AC power etc.) is also welcome.
Last edited by Usher on 2021-05-21, 15:12 UTC, edited 1 time in total.
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
- ghisler(Author)
- Site Admin
- Posts: 50479
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Disable screensaver when lister plays video
Sounds like a good idea, I will try adding it.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Disable screensaver when lister plays video
It doesn't work in TC 10b8 in Windows XP 32-bit.History.ini wrote:27.04.21 Added: Prevent screen saver and sleep mode while playing video. Re-enable while paused or stopped (32/64)
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
- ghisler(Author)
- Site Admin
- Posts: 50479
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Disable screensaver when lister plays video
I'm using SetThreadExecutionState, which works well on Windows 10. Searching for
SetThreadExecutionState Windows XP
seems to indicate that the function is faulty on Windows XP and Vista.
I don't know what I should use instead - people seem to suggest all kinds of hacks like sending yourself fake keypresses or so...
SetThreadExecutionState Windows XP
seems to indicate that the function is faulty on Windows XP and Vista.
I don't know what I should use instead - people seem to suggest all kinds of hacks like sending yourself fake keypresses or so...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Disable screensaver when lister plays video
2ghisler(Author)
What about direct editing registry?
It's "ScreenSaveActive" value in HKEY_CURRENT_USER\Control Panel\Desktop
EDIT:
You can store existing value, set "ScreenSaveActive" to 0 on video player start and restore saved value on player pause/stop/exit.
What about direct editing registry?
It's "ScreenSaveActive" value in HKEY_CURRENT_USER\Control Panel\Desktop
EDIT:
You can store existing value, set "ScreenSaveActive" to 0 on video player start and restore saved value on player pause/stop/exit.
Last edited by Usher on 2021-04-30, 16:02 UTC, edited 1 time in total.
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
Re: Disable screensaver when lister plays video
A no go for a portable installation.Usher wrote: 2021-04-30, 15:02 UTC 2ghisler(Author)
What about direct editing registry?
It's "ScreenSaveActive" value in HKEY_CURRENT_USER\Control Panel\Desktop
And we are talking about a dead OS
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.55 RC1 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.55 RC1 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
Re: Disable screensaver when lister plays video
2Horst.Epp
It's NOT April 1st today.
Suggest a better solution or stop kidding, please.
It's NOT April 1st today.
Suggest a better solution or stop kidding, please.
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
Re: Disable screensaver when lister plays video
2Usher
Changing such value in registry won't be applied without logging out and in again. Besides, it won't change anything in regards to the monitor going to sleep/standby.
Regards
Dalai
Changing such value in registry won't be applied without logging out and in again. Besides, it won't change anything in regards to the monitor going to sleep/standby.
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: Disable screensaver when lister plays video
2Dalai
So how other players work? How changes from Control Panel applet are applied?
So how other players work? How changes from Control Panel applet are applied?
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
Re: Disable screensaver when lister plays video
Blocking the Windows Screen Saver in Delphi including the links to StackOverflow in that article.
Regards
Dalai
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
- ghisler(Author)
- Site Admin
- Posts: 50479
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Disable screensaver when lister plays video
Thanks, these seem to be for newer systems only. But the linked StackOverflow article metions that we have to intercept WM_POWERBROADCAST to prevent the screen saver from running on XP, so I will try to add that.
Edit:
Unfortunately the WM_POWERBROADCAST method does not prevent the screen saver from starting, it only seems to prevent the sleep/hibernation of the system. Reacting to WM_SYSCOMMAND, SC_SCREENSAVE and returning -1 seems to work.
Edit:
Unfortunately the WM_POWERBROADCAST method does not prevent the screen saver from starting, it only seems to prevent the sleep/hibernation of the system. Reacting to WM_SYSCOMMAND, SC_SCREENSAVE and returning -1 seems to work.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Disable screensaver when lister plays video
2ghisler(Author)
It still doesn't work as expected in Windows XP. Running video in full screen kills screensaver blocking feature. Follow these steps:
1. Set screensaver delay to 1 minute.
2. Play video in Lister and wait 1 minute to ensure that screen saver won't be activated.
3. Double click the video to run it in full screen and wait another minute. Screen saver will start now.
4. Press Esc to stop screensaver, than press Esc again to go back to playing in Lister window. Wait one more minute and you will see screensaver active again.
You have to restart Lister to reactivate screensaver blocking.
It still doesn't work as expected in Windows XP. Running video in full screen kills screensaver blocking feature. Follow these steps:
1. Set screensaver delay to 1 minute.
2. Play video in Lister and wait 1 minute to ensure that screen saver won't be activated.
3. Double click the video to run it in full screen and wait another minute. Screen saver will start now.
4. Press Esc to stop screensaver, than press Esc again to go back to playing in Lister window. Wait one more minute and you will see screensaver active again.
You have to restart Lister to reactivate screensaver blocking.
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
Re: Disable screensaver when lister plays video
I can confirm this under Windows 7 x641. Set screensaver delay to 1 minute.
2. Play video in Lister and wait 1 minute to ensure that screen saver won't be activated.
3. Double click the video to run it in full screen and wait another minute. Screen saver will start now.
4. Press Esc to stop screensaver, than press Esc again to go back to playing in Lister window. Wait one more minute and you will see screensaver active again.
You have to restart Lister to reactivate screensaver blocking.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
- ghisler(Author)
- Site Admin
- Posts: 50479
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Disable screensaver when lister plays video
I haven't tried in full screen so far, because I don't see a reason why it should be different. I will check it.
But does it work for you in normal (not full screen) mode? I tried it on Windows XP and 7, and the screen saver didn't activate until 1 minute after the video stopped.
But does it work for you in normal (not full screen) mode? I tried it on Windows XP and 7, and the screen saver didn't activate until 1 minute after the video stopped.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Disable screensaver when lister plays video
2ghisler(Author)
Screensaver blocking works OK as described in steps 1 and 2 - with normal and maximized Lister window.
Full screen is a special case (for example, no pop-up messages allowed) and should always be tested separately.
Screensaver blocking works OK as described in steps 1 and 2 - with normal and maximized Lister window.
Full screen is a special case (for example, no pop-up messages allowed) and should always be tested separately.
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator