viSci Posted October 4, 2006 Report Share Posted October 4, 2006 Hello all, I would like to have my application generate some sort of windows event that will stop the screensaver from starting up. I have tried generating mouse movements but this does not seems to work. Any ideas? Quote Link to comment
Norm Kirchner Posted October 4, 2006 Report Share Posted October 4, 2006 have it set the screen saver to <None> Now the right way to do that... Not sure, but that's your best bet. Probably some win API function. Do a submit to Info LV and Geroge Zou will probably reply w/ some cool Win32 dll call to do it. Quote Link to comment
Khalid Posted October 4, 2006 Report Share Posted October 4, 2006 Hello all,I would like to have my application generate some sort of windows event that will stop the screensaver from starting up. I have tried generating mouse movements but this does not seems to work. Any ideas? You can programmatically disable the Screen Saver by calling the SystemParametersInfoA function from the User32.dll. Look this function up on MSDN. Note all parameters are of type U8. Regards, -Khalid Quote Link to comment
jaegen Posted October 4, 2006 Report Share Posted October 4, 2006 You can programmatically disable the Screen Saver by calling the SystemParametersInfoA function from the User32.dll. Look this function up on MSDN. Note all parameters are of type U8. Regards, -Khalid Here is the MSDN Link. Jaegen Quote Link to comment
Jacemdom Posted October 4, 2006 Report Share Posted October 4, 2006 You can programmatically disable the Screen Saver by calling the SystemParametersInfoA function from the User32.dll. Look this function up on MSDN. Note all parameters are of type U8. Regards, -Khalid 1- I can't make it to work, could you send me a VI? 2- Where did you get the 17 = SPI_SETSCREENSAVEACTIVE? Quote Link to comment
Khalid Posted October 4, 2006 Report Share Posted October 4, 2006 1- I can't make it to work, could you send me a VI?2- Where did you get the 17 = SPI_SETSCREENSAVEACTIVE? 1. I am attaching the VI. Are you getting an error? NOTE: I haven't tested this with non-administrator privileges. 2. This is #defined in winuser.h (google it) -Khalid Download File:post-311-1159984804.vi Quote Link to comment
LAVA 1.0 Content Posted October 4, 2006 Report Share Posted October 4, 2006 Note all parameters are of type U8. Looks good. As LabVIEW stores boolean as U8 internally, you don't need in general to cast it to I32 first and then back to U8. You can use adapt to type and boolean will be passed natively as U8. Quote Link to comment
Khalid Posted October 4, 2006 Report Share Posted October 4, 2006 Looks good. As LabVIEW stores boolean as U8 internally, you don't need in general to cast it to I32 first and then back to U8. You can use adapt to type and boolean will be passed natively as U8. Good point! Thanks, -Khalid Quote Link to comment
Jacemdom Posted October 5, 2006 Report Share Posted October 5, 2006 Hello all,I would like to have my application generate some sort of windows event that will stop the screensaver from starting up. I have tried generating mouse movements but this does not seems to work. Any ideas? I would suggest to look into the .NET framework, i be;ieve you will find something there. Or you could use the attached VI to change the timeout of the screen saver to a maximum of 9999 minutes. Download File:post-731-1160055219.vi Quote Link to comment
viSci Posted October 5, 2006 Author Report Share Posted October 5, 2006 I am finding that none of the proposed methods will work in my case. The screen saver in question is apparently network administered and designed not to be foiled. It's purpose is to force a login prompt if the computer is not used for 1800 seconds. The screen saver settings appear to be locked. I have even tried some registry hacks but they do not stick. I had assume there would be some way to fake user activity but ordinary mouse and keyboard events do not work. Quote Link to comment
crelf Posted October 5, 2006 Report Share Posted October 5, 2006 ...is apparently network administered and designed not to be foiled. ...and there is your answer! Looks like need to talk to your administrator Depending on company policies, admins are usually not keen to completely remove the station locking, but if given a good reason (it screws up my experiment because the data acquisition stops and I loose my data) they'll often help you out by increasing the time to the lock. Quote Link to comment
Grampa_of_Oliva_n_Eden Posted October 5, 2006 Report Share Posted October 5, 2006 I am finding that none of the proposed methods will work in my case. The screen saver in question is apparently network administered and designed not to be foiled. It's purpose is to force a login prompt if the computer is not used for 1800 seconds. The screen saver settings appear to be locked. I have even tried some registry hacks but they do not stick. I had assume there would be some way to fake user activity but ordinary mouse and keyboard events do not work. Hi Sachsm, I asked the same question in this thread http://forums.ni.com/ni/board/message?boar...d=114553#M52654 about three years ago. None of the posted replies worked for me but there maybe something there that can help you. Ben If I had a time machine and a license to kill.... There are two people I would chase down. The person who decide that men should shave and the person who invented computer viruses. Quote Link to comment
abullen Posted October 5, 2006 Report Share Posted October 5, 2006 I am finding that none of the proposed methods will work in my case. The screen saver in question is apparently network administered and designed not to be foiled. It's purpose is to force a login prompt if the computer is not used for 1800 seconds. The screen saver settings appear to be locked. I have even tried some registry hacks but they do not stick. I had assume there would be some way to fake user activity but ordinary mouse and keyboard events do not work. We have the same problem in our company. These settings are usually controlled thru registry settings that are manipulated remotely. We wrote a some vbs code to defeat this practice. It uses the registry key: HKEY_CURRENT_USER\Control Panel\Desktop\screensaveactive",iScreenActive,"REG_SZ. Did you try this? Andrew Quote Link to comment
tnt Posted October 6, 2006 Report Share Posted October 6, 2006 Hi, this one worked for me, just send a shift down/up (=click) every e.g. 5 minutes Good luck, TNT Download File:post-2311-1160133311.zip Quote Link to comment
Michael Aivaliotis Posted October 23, 2006 Report Share Posted October 23, 2006 I had assume there would be some way to fake user activity but ordinary mouse and keyboard events do not work. What do you mean by by "ordinary"? These need to be API calls. Simulating keyboard strokes using a windows API should do it. Quote Link to comment
AnalogKid2DigitalMan Posted November 9, 2007 Report Share Posted November 9, 2007 I know this is a Zombie Thread, but we recently had this policy applied at our company. Found out that if Windows Media Player is playing a video or sound clip, the screen saver would never kick in. You can set the player to loop forever. Not a direct solution, but it curiously has worked on 3 of 3 PC's tested. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.