JeffAllenNJ Posted Wednesday at 04:51 PM Posted Wednesday at 04:51 PM That said, I've seen posts on this forum before aimed at keeping screen savers from kicking in and such. However, all those posts seemed too old for me to resurrect. So, I thought it best to start a new one. The following command successfully prevents my screen saver from kicking in: Local $aRet = DllCall('kernel32.dll', 'long', 'SetThreadExecutionState', 'long', 0x80000003) ; reset system and display idle timers (continuous) The problem is that the call to reset the power state has never been working for me. When I issue the call below, my screen saver never kicks in. Local $aRet = DllCall('kernel32.dll', 'long', 'SetThreadExecutionState', 'long', 0x80000000) ; power reset state NOTE: I've been on this forum for many years but, for some reason, I had to create a new account with an "@" in it. Suffice it to say, this is not my first post.
Nine Posted Wednesday at 05:49 PM Posted Wednesday at 05:49 PM There was a forum login change sometimes ago. You may want to ask @Jos to help you revert back to your old account. As for you issue, I am not sure I understand : 56 minutes ago, JeffAllenNJ said: When I issue the call below, my screen saver never kicks in. So you want your screen saver to start ? “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Multi-Threading Made Easy
Developers Jos Posted Wednesday at 06:06 PM Developers Posted Wednesday at 06:06 PM 1 hour ago, JeffAllenNJ said: NOTE: I've been on this forum for many years but, for some reason, I had to create a new account with an "@" in it. Suffice it to say, this is not my first post. Not sure what you mean here other than, like @Nine mentioned, you need to use your Email now to login to stop the many hacking attacks. PM me your previous account and I will merge it into this one, keeping the name&Email of this one. JeffAllenNJ 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
JeffAllenNJ Posted Wednesday at 06:19 PM Author Posted Wednesday at 06:19 PM @Nine, yes, I want the screensaver to be disabled only under certain conditions which I will control progamatically. After that, I was the screensaver to go back to normal.
Nine Posted Wednesday at 08:50 PM Posted Wednesday at 08:50 PM It works perfectly on my end : #include <WinAPIProc.au3> ; with a 1 minute Screen Saver : Local $iState = _WinAPI_SetThreadExecutionState($ES_CONTINUOUS + $ES_DISPLAY_REQUIRED + $ES_SYSTEM_REQUIRED) ConsoleWrite("started " & Hex($iState) & "/" & @MIN & ":" & @SEC & @CRLF) For $i = 1 To 120 Sleep(1000) Next ConsoleWrite("delay ended" & "/" & @MIN & ":" & @SEC & @CRLF) _WinAPI_SetThreadExecutionState($ES_CONTINUOUS) For $i = 1 To 120 Sleep(1000) Next Screen saver is disabled during the first 2 minutes loop, and it comes back after 1 minute during the second 2 minutes loop. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Multi-Threading Made Easy
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now