Ask a Question

Programming Around A Screen Saver

MarkSchofer
Frequent Contributor

Programming Around A Screen Saver

I tried two different methodologies.

 

i have a routine that moves the mouse occasionally. Each loop in my process. I then call this simple routine.

==========================

def MoveMouse():
Sys.Desktop.MouseX = Sys.Desktop.MouseX + 1

========================

As well as 

Win32API.SystemParametersInfo(Win32API.SPI_SETSCREENSAVEACTIVE, False,"Null",0);

=======================

In theory they should work. They do not. I get no error.

 

4 REPLIES 4
Marsha_R
Community Hero

Re: Programming Around A Screen Saver

You don't want to just shut off the screensaver manually on that machine?

 

https://support.smartbear.com/testcomplete/docs/working-with/best-practices/tips.html

  • If there are long pauses between test actions in your distributed tests, make sure that the screen saver, power saving options and lock screen are disabled. Otherwise, TestComplete will fail to continue the test run after the computer is locked.

 

 


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
MarkSchofer
Frequent Contributor

Re: Programming Around A Screen Saver

Of course I do. I work for an Agency that controls that type of thing.

AlexKaras
Community Hero

Re: Programming Around A Screen Saver

Hi,

 

What about direct registry edit (from the scheduled task?) to disable screensaver ?

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Marsha_R
Community Hero

Re: Programming Around A Screen Saver

I have to ask because there is no "of course" around here!  You might or might not be surprised at what people want to spend days automating when they could just turn it off.  

 

There's an example in this archived thread that is similar to one of yours.  @HKosova is pretty good at this stuff.  😉

 

https://community.smartbear.com/t5/TestComplete-Questions/Interrupt-for-Screensaver/td-p/73546

Sub Test

  Set timer = Utils.Timers.Add(900, "Unit1.MoveMouse", True)

 

  ' Do something

End Sub

 

Sub MoveMouse

  Sys.Desktop.MouseX = Sys.Desktop.MouseX + 1

End Sub

 


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
cancel
Showing results for 
Search instead for 
Did you mean: