sdc Posted March 17, 2009 Posted March 17, 2009 Hi everyone Has anyone come across a free utility to auto-generate keystrokes/keypresses at timed intervals? I would like to be able to clear annoying info boxes on a wall-mounted display screen; these messages only have an "OK" button, so timing an automatic "Enter" or "Space" keypress every 10 minutes/hour/etc would be very useful! I'm sure I've seen something like this at some point, but can't recall where now...! Thanks in advance Stephen
strawberry Posted March 17, 2009 Posted March 17, 2009 autoit. AutoIt v3 - Automate and Script Windows Tasks - For Free! 1
box_l Posted March 17, 2009 Posted March 17, 2009 set WshShell = CreateObject("WScript.Shell") WshShell.Sendkeys "what_ever_you_want" WScript.Sleep 1000 WshShell.Sendkeys "what_ever_you_want" WScript.Sleep 1000 WScript.Quit() etc etc save as .vbs check SendKeys Method for the correct "what_ever_you_want" to insert BoX
dhicks Posted March 17, 2009 Posted March 17, 2009 I would like to be able to clear annoying info boxes on a wall-mounted display screen; these messages only have an "OK" button, so timing an automatic "Enter" or "Space" keypress every 10 minutes/hour/etc would be very useful! Better - AutoIt has a WaitForNamedWindow or similar function, can't remember the exact name, that will wait for a specifically named window to appear, then execute some code for you. You could have the pop-up dismissed as soon as it appears. Probably a silly question, but what is it that's causing a message to pop up every 10 minutes, anyway? -- David Hicks
mattx Posted March 17, 2009 Posted March 17, 2009 WinWait ( "title" [, "text" [, timeout]] ) ;Wait for the window "Untitled" to exist Run("notepad") WinWait("Untitled") ;Wait a maximum of 5 seconds for "Untitled" to exist WinWait("Untitled", "", 5) Stick it in a loop and hey presto. 1
sdc Posted March 18, 2009 Author Posted March 18, 2009 Thanks for the responses so far; I've tried using the WinWait and WinWaitActive functions in AutoIt but haven't had long enough yet to make it work... I'll keep trying however. The messages that need to be OK'd are "Connection failed" messages within Spotlight on Windows - if there's a momentary network blip, then at least one of our servers will disappear from the console with the message that its connection has failed. All that needs to happen is for that dialog box to be OK'd, followed by a few keystrokes which cause the file menu to be opened, and all the connections being re-established (those that survived the blip aren't affected by being reconnected!). Hope that makes sense. If anyone has any better ideas as to how to achieve this (such as auto-reconnect options within Spotlight on Windows), that would be great - I've not come across anything like this in the program, unfortunately. Thanks Stephen
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now