LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[OT] Has anyone figured out how to simulate key strokes or mouse movements from within a LV app so as to keep a screen-saver from kicking in?

My customer has recieved dictates from above that all PC's must have a password protected screen saver enabled on all of the PC's. There can be no exceptions to this rule.

The OS is Windows 2000.
LV-DSC ver 6.1.

The lab manager would like to avoid hiring someone just to walk around from PC to PC just to keep the screen saver from turning on.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 1 of 13
(6,833 Views)
Hi Ben

From Open G Forum there is Windows System Utility VI Palette. Under Open G Palette. This has Screen Saver Control VI. You can disable Screen Saver. But a better Method is to Increase the time to say 10 hours. I have tried it with 100 hours or 6000 Minutes. So Screen Saver Will not Kick in for 100 Hours. When the Progrm Ends you can set the time Back to Whatever the Company Directive is.

This is One Solution. To get this Utility Go to www.OpenG.org Install the whole Open G Tool Set and you should have this VI.

Good Luck!!

Mache
Good Luck!

Mache
Message 2 of 13
(6,833 Views)
Good answer but...

Big brother is watching us!

I.T. will be checking the systems to ensure the machines are set the way they dictate.

I am still looking for a way make it look like someone is alive and moving the mouse (or keyborad).

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 13
(6,833 Views)
Well Ben,

I am Sure Big Brother Does Not Know about DOKBDEVENT.vi

This Vi Is also included in the Open G Add Ons Tool Box, under "Lab-Useful Keystroke Generator -> SendKey.LLB"

I just tried it and it works. No need to change any Screen Saver Settings. The Vi Generates Key Strokes as if from KeyBoard.

Good Luck!!

Mache
Good Luck!

Mache
0 Kudos
Message 4 of 13
(6,833 Views)
Hi Ben

Try using the Windows API call which is in this example:
http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3EC5756A4E034080020E74861&p_node=DZ53044&p_submitted=N&p_rank=&p_answer=&p_source=External

It simulates the pressing of a key. I hope that the screensaver does not distinguish between a key press and a simulated key press. I haven't tested it.

Luca
Regards,
Luca
Message 5 of 13
(6,833 Views)
Thank you very much.

That sounds like what I was looking for.

I saw your reply at the same time as I saw Luca's post so I will try that one first because it says it is supported by NI.

If that does not work, I will try the Open G version.

Thank you Mache!

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 13
(6,833 Views)
Thank you Luca,

Your NI supported solution is what I will try first. I will update here after I have tried it out.

Thanks,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 13
(6,833 Views)
Also check out the LabVIEW Windows 32bit Utility EPD. It is well documented and should provide many ways to fool big brother.

lvwin32util EPD
Message 8 of 13
(6,833 Views)
Ben;

Sorry for playing devil's advocate here, but...

Doesn't the alternative you are looking violates your customer's security policy? There must be a rationale behind the rule, which I think is to prevent unauthorized use of the computer if left unattended. Your program will create a security hole!

What is the problem if the screen saver kicks-in?

Enrique
www.vartortech.com
Message 9 of 13
(6,833 Views)
Hi Enrique,

Playing the devil's advocate is the role I generally play, but I'll let you take that part for the time being.

My customer is running test that take from 15 to 30 minutes to run. The dictate from above says "password protected screen-saver set for 10 minute time-outs".

This means the operators will have to "jiggle" the mouse regularly if they want to be able to monitor the test's progress.

Now add to this the fact that they are running the same app on 4 PC's, this works out to at least one jiggle every 2.5 minutes.

The operators of these systems were busy enough with the work involved in conducting the tests. If they get delayed in the "jiggling", they are going to have to stop and log-in again. Of cousre we can just say "well they
are just going to have to move faster" but operators "running laps" in a lab that is using Hydrogen Sulfide, anhydrous ammonia, phosgene, and cyclohexane all the same time is a safety hazard.

So this reduces to a decision between a security risk, and a safety hazard. The security risk for a restricted lab inside a secure complex is low.

The option to have the "jiggling" done automatically while tests are running is an option that allows the systems to comply with the dictates from above while maintaining a safe and productive laboratory. None of these systems will be left un-attended while tests are running so strangers walking in and deleting files or installing virus ridden software while the tests are running is a long shot.

I have not implemented the "auto-jiggler" into the application. I have given the customer the option to try this approach if they so choose. It is their call.

Thank you for the "sanity check". It is this type of thoughtful responses that make this e
xchange a valuable resource. ("As face answereth to face, and iron answereth to iron, so does a man trieth words", "There is wisdom in a multitude of counsellors" Proverbs)

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 10 of 13
(6,547 Views)