|
| |||||||||
| Tags: mouse, screensaver, windows xp, workstation |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| How to simulate mouse movements to prevent screen saver activation?
In our office the admins tend to be crazy. They configured the ScreenSaver activation after 8 (!) minutes of no mouse movement. After screen saver activation I have to re-logon and re-type my password. This is very inconvenient. Unfortunately I cannot change the screen saver activation time because it is managed central by the server and not adjustable on my workstation. So I am thinking about writing a program which simulates mouse movements by a pixel each minute. Is this possible somehow? |
|
#2
| |||
| |||
|
After the screen saver cuts in, you don't have to re-logon. You only need to enter your password, which is very quick. While it may be possible to run a program that simulates user activity, it's probably not a good idea to install it. Presumably the security policy in your company was formulated with the agreement of top management. By trying to get around it, you would be defying that policy. It would be much better to discuss the matter with your manager and request that the policy be reviewed because it presumably affects your productivity. Depending on your privileges, you could try HotCorners |
|
#3
| |||
| |||
|
I read somewhaere that if the mouse cursor is place on the Startbar / Start button, the screen saver would not start. I never did find this "note" ever again thourgh Even if it is, you'd need admin privileges to install/run it. Only if the Admin has given you software installation rights. You can always tie the mouse to one of those small windup toys and have it roam around the desk ... The sushi ones are cute. Windows Media Player (WMP11 in my case) has an option "Allow Screensaver during playback" which you can deselect. Then you play any old video, and press pause. It seems to me that my WMP11 prevents the screensaver even when what it is playing back is just music. It sometimes seems to prevent it when it is totally idle. |
|
#4
| |||
| |||
| Re: How to simulate mouse movements to prevent screen saver activation?
NOTE: Inappropriate use of the FollowUp-To header was ignored. Original list of newsgroups was used for this reply. If your domain login gives you local admin privileges on your own host, you can use a .reg (registry) file to change the screensaver idle timeout. First ask your IT folks if they will permit you to change your own screensaver timeout. They may not make a per-account change to let the timeouts vary by account but they may not bar you from altering your own timeout. When you logon under a domain account, policies get pushed into your registry. You can add a .reg file into your Startup group that can later alter those policies by altering the registry entries, but you will need to have admin privileges on your own host under that domain account to do any registry changes. If you don't have admin privileges on your own host for your domain login then you can't alter the registry to change the screensaver timeout. --- Rant on inappropriate use of the FollowUp-To header --- Don't use the FollowUp-To header. Posting to, say, 3 newsgroups but moving replies to just 1 of them or to a completely different one means you disconnect the visitors of those other 2 (or 3) newsgroups from the rest of the discussion. If a newsgroup is appropriate for your post then it is also appropriate for the replies. Or, converserly, if the continued discussion of your post is not appropriate in all the newsgroups to which you cross-posted then you should not have posted to those other newsgroups in the first place. You are using the FollowUp-To header to move replies to YOUR "home" newsgroup but which the users of the other newsgroups may not visit. After all, if you cross-post and include your "home" newsgroup then you'll see all those replies in your home newsgroup and meanwhile all the other users can still see the replies in their newsgroup where you decided to also publish your post. In http://www.faqs.org/faqs/usenet/primer/part1/, it says, "For a cross-post, you may want to set the Followup-To: header line to the most suitable group for the rest of the discussion". Read another way, that means you disconnect the discussion from all the visitors of the other newsgroups to which you decided to publish your post. Why did you publish to those other newsgroups if you are going to yank the discussion away from those users and perhaps even from the respondents you were attempting to elicit? It is exasperating to post a reply and never see it in the newsgroup where you read the original post. If your post was appropriate for all the groups to which you cross-posted then why wouldn't those same groups be appropriate for the replies? To yank away the discussion to your "home" group is rude since that is probably not the "home" group for your respondents. You wanted replies which may require further replies but now your respondents no longer see the thread in the newsgroup that they visit to where you published your post. Also, the respondents may not know if their reply is appropriate in the "home" group that you happen to choose. In general, malcontents and spammers use the FollowUp-To header to hide negative replies to their flame or spam posts, often sending the replies off to a *.test newsgroup. There are some cases where FollowUp-To should be used. For example, say a newsgroup is supposed to only get used for citing the content of a spam e-mail. Discussions about that spam are not supposed to be published in that citing newsgroup. Just the exhibits are published there. If someone wants to discuss that particular spam, their replies should go into a different newsgroup meant for those discussions. I believe that is how some of the NANAE newsgroups operate but the principle may apply elsewhere but it is rare few newsgroups where FollowUp-To is appropriate. For the vast majority of newsgroups, FollowUp-To is *not* appropriate. If you do not want continue the discussion in the other newsgroups then don't cross-post over there (and then use FollowUp-To to yank away the continued discussion). If the discussion is not appropriate in those other newsgroups then it seems you have nominated your post to be spam. If you do use the FollowUp-To header, you are expected per netiquette to alert the readers of your post that you used that header. Be polite and add a note (at the start of your post) saying that you used the header (ex., "WARNING: FollowUp-To was used and points to <newsgroup>". You might also want to explain why any further discussion in the other newsgroups is inappropriate despite your rudeness in posting to those other newsgroups. Many times respondents wonder where their reply post went because they expect to see it in the group they visited and where they read your post. Not all NNTP clients alert the user that the poster used the FollowUp-To header. Think about it: you post to multiple newsgroups but yank the replies to a different newsgroup than where your respondents visited, then you need more help and reply to those replies but which are now only in your "home" newsgroup, but the respondents won't see their posts nor will they see your replies to them asking for more help. FollowUp-To is not required when you cross-post since your "home" newsgroup should be one those that were specified in the list of newsgroups. You'll watch the discussion in your home newsgroup and the respondents or lurkers can watch that same discussion in their own newsgroup. If you don't want replies to show up in all the newsgroups to which you cross-posted then don't cross-post over there in the first place! When crossposting, there are not multiple copies of your post that wastes bandwidth for each to get them propagated to other NNTP servers and there aren't multiple copies of your post consuming disk space. A single copy gets sent to the other NNTP servers and a single copy resides on each NNTP server with pointers to it to make it show up in multiple newsgroups. You aren't saving bandwidth or disk space by redirecting replies for a cross-posted message to a single newsgroup. You are just being rude to the visitors of the other newsgroups to which you cross-posted but tried to yank away the discussion. |
|
#5
| |||
| |||
|
That's quite a bit of time for a computer to remain idle. In secure environments, the time is often set to 1 minute. Then all you need to is stay busy, and you'll never see the screen saver. Exactly as it should be. If you network administrator is so conscientious as to have set the screen-saver time period by group policy, do you really think he/she'd have been so careless as to have given you sufficient privileges with which to install such malware on your workstation? I wanna bet it activates if you don't use the keyboard either. Unless your job involves reading a lot or watching a lot video on your computer, then you should never even reach anything close to 8 minutes of idle time while in front of the computer... if you have to get up a lot and happen to get back to your computer just when the screen saver kicks in, that's a different matter. Imagine how inconvenient it'd be if anyone could walk up to your computer and mess around with your files while you were away from it. The whole point in the auto-logout is to prevent that. It depends on what your job is, and what business you're in, how relevant this is to begin with. If you can't change the screen saver timer, you more than likely won't be able to install anything on your computer to do what you want to begin with. |
|
#6
| |||
| |||
|
Wow, the naivety of the IT people really amuses me. Not everyone spends all day in word processors or spreadsheets typing all day. Today I was hit with the wonderful group policy hell that people on this and other threads are complaining about. I don't believe that my environment is unusual, I have several computers I work on and use remote desktop to switch from one to the other. I must have typed my password 100 times today. Thanks IT. That is all from my soapbox. So given that I hate the situation as much, if not more than others I decided to write some code to get around it. What you need is a windows form, with a text box and a timer (the interval of the timer must be less than the policy setting). When the timer fires call teh timer function below: namespace StopScreenSaver { public partial class Form1 : Form { [DllImport("User32.dll")] private static extern int SetForegroundWindow(IntPtr hWnd); [DllImport("User32.dll")] private static extern IntPtr GetForegroundWindow(); public Form1() { InitializeComponent(); } private void OnTimerExpired(object sender, EventArgs e) { IntPtr previous = GetForegroundWindow(); SetForegroundWindow(this.Handle); textBox1.Text = ""; SendKeys.Send("a"); SetForegroundWindow(previous); } } } Enjoy Leave optical mouse on top of a small analogue alarm clock with a second hand. |
|
#7
| |||
| |||
| Re: How to simulate mouse movements to prevent screen saver activation?
Great job! I agree 100% - the bonehead administrators have no clue about the work life of average developers. I too work with at least 2 computers, sometimes 3 or 4. Besides which, a single call or meeting will activate all the screen savers. I needed to use this tool while working remotely for a client of mine who has this stupid policy (and refused to change it). Our Gotomeeting session kept timing out and no-one was around to re-activate the screen. Bingo.. just run the keepalive program and the problem is solved. I took the code and compiled it using .net 2.0 framework... works great. Here is the main Form1.Cs file if anyone wants to do the same using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Runtime.InteropServices; namespace KeepAlive { public partial class Form1 : Form { [DllImport("User32.dll")] private static extern int SetForegroundWindow(IntPtr hWnd); [DllImport("User32.dll")] private static extern IntPtr GetForegroundWindow(); public Form1() { InitializeComponent(); } private void timer1_Tick(object sender, EventArgs e) { IntPtr previous = GetForegroundWindow(); SetForegroundWindow(this.Handle); textBox1.Text = ""; SendKeys.Send("a"); SetForegroundWindow(previous); } private void Form1_Load(object sender, EventArgs e) { } } } here is the Form1.designer.cs file.. 100 secs on the timer. namespace KeepAlive { partial class Form1 { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.textBox1 = new System.Windows.Forms.TextBox(); this.timer1 = new System.Windows.Forms.Timer(this.components); this.SuspendLayout(); // // textBox1 // this.textBox1.Location = new System.Drawing.Point(1, 4); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(28, 20); this.textBox1.TabIndex = 0; // // timer1 // this.timer1.Enabled = true; this.timer1.Interval = 100000; this.timer1.Tick += new System.EventHandler(this.timer1_Tick); // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(39, 27); this.Controls.Add(this.textBox1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.Name = "Form1"; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; this.Text = "Admin"; this.Load += new System.EventHandler(this.Form1_Load); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.Timer timer1; } } |
|
#8
| |||
| |||
|
There seems to be an odd tendency to respond to this request by passing judgment on the desire to do it and suggesting simply not to. Which I'm sure is a very helpful response for an idiot without the sense to know what screensavers are for, or someone who actually needs some coaching on the work habits he should use in doing his job. But let me satisfy the jury by justifying my need first: I telecommute full time for a very large corporation, work from my desk at home. Policies require password screen saver, 10 minutes, and automatic security tool runs routinely to ensure compliance, sending a nasty gram to my manager if I turn it off. Since there is never another human in my home while I'm working, there is absolutely zero chance that the security of my computer will be compromised by lack of screenlock password. It serves no purpose other than as a nuisance to me and to satisfy the dratted security tool. It seems security policies like this are often put in place and enforced universally, even for those with special circumstances that make the policies unnecessary. Does that satisfy the jury that I've given proper respect to the issue of security? Now my work habits--some days I keep my hands on keyboard all day long and screen saver never comes on. Other days, I work across the room sitting at my other desk, and I can glance over at my screen now and then to see if there are any new requests for me to handle or any blinking chat messages signalling someone wants to speak to me. Screen saver comes on, can't see the screen anymore, plus the annoyance of having to get up and go do the password again. So you see, I may need the screen to be viewable for longer than 10 minutes without touching the mouse or keyboard--and not because I'm watching videos. Would one of you be kind enough to explain exactly how I can implement the code given here? Explain it like you're talking to a small child with a degree in computer science. Never did any programming in Windows before. I must say that some people are quite arrogant and it's a shame that people must be so derogatory when people ask for help. If you don't have a solution just move on rather than cast judgement. My problem is that there are applications on my work laptop that must remain active in case I get a message. however the laptop isn't powerful enough or large enough for me to do my graphics editing when working from home. So I use a 2nd laptop with larger screen that is more powerful. I edit one image on my home laptop and the other goes into standby making it appear as though i'm offline. So please make an effort to understand others situations and the forums wil be happier more helpful places. |
|
#9
| |||
| |||
| Re: How to simulate mouse movements to prevent screen saver activation?
I have the same problem here at work. My WinXP SP3 laptop locks itself (as if pressing Win+L) after about 15 minutes of inactivity. The irony is that I need to watch presentations that take more than 15 minutes, or I'm in online meetings where there's no need for mouse/keyboard and it pisses me off that the screen locks. So I wrote a small Perl script to simulate mouse movement: PHP Code: UPDATE: I found that if I have WinSCP 4.2.7 attempt to connect to an unreachable host, the screen never locks. I posted on their forum to find out why this happens and I asked the author to extract that functionality into a small utility to prevent screen saver activation. |
|
#10
| |||
| |||
| Re: How to simulate mouse movements to prevent screen saver activation?
You guys are lucky. I work at the stupidest fuking company* in the world. My timeout is set to 3 minutes. So if I am holding still reading something, my screen locks, and I have to re-enter my password. Fuking distracting! |
|
#11
| |||
| |||
| Re: How to simulate mouse movements to prevent screen saver activation?
Hi , I have been working on similar tool, the only way that made it work is to use SendInput function in Win32 API. Then P/Invoke it from .NET The tool is available as a binary if you want to download it from my blog. Regards, Mike |
|
#12
| |||
| |||
| Re: How to simulate mouse movements to prevent screen saver activation?
Or go to murgee.com, download, run (doesn't install so no admin needed), pay $5 and go on with your life. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "How to simulate mouse movements to prevent screen saver activation?" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Activation Follows Mouse (x-mouse) Snap To / moves pointer to defa | TechPhD | Windows XP Support | 2 | 06-06-2009 01:18 PM |
| Controlling Windows with the mouse movements | fumble | Guides & Tutorials | 5 | 13-05-2009 01:14 PM |
| screen saver won't come on | stizidae | Windows XP Support | 0 | 25-02-2009 09:09 PM |
| Screen Saver will not come on | kborgsmiller | Windows Vista Performance | 1 | 22-11-2008 08:21 PM |
| Screen Saver | Bill | Vista Help | 19 | 25-07-2008 11:03 AM |