Jump to content

Recommended Posts

Posted

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.

Posted

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 ?

  • Developers
Posted
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.

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.
  :)

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...