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
sdc (17th March 2009)
etc etcCode: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()
save as .vbs
check SendKeys Method for the correct "what_ever_you_want" to insert
Probably a silly question, but what is it that's causing a message to pop up every 10 minutes, anyway?
WinWait ( "title" [, "text" [, timeout]] )
Stick it in a loop and hey presto.Code:;Wait for the window "Untitled" to exist Run("notepad") WinWait("Untitled") ;Wait a maximum of 5 seconds for "Untitled" to exist WinWait("Untitled", "", 5)
dhicks (17th March 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.
There are currently 1 users browsing this thread. (0 members and 1 guests)