2

Can you recommend software that records what you are doing and then plays back the commands as well as allowing you to save that recording and set it up as an automatic task?

The reason I ask is because I'm struggling with automating a manual task because I don't have a way to pass the inputs to it via a normal vbscript or similar. The command is started from a command line but then asks for different inputs (that remain constant on each run).

I'd like a way to record it once, telling it to run "program.exe" then telling it to type "2" and "enter" and then "Bob" and "enter", etc.

Is my best bet AutoIT? I saw it in another question but haven't looked deeply at it in case someone else here had another suggestion that would be better.

Thanks.

P.S. I'm aware that this should be a last resort type thing, but I'm tired of running the same thing daily manually.

2
  • 1
    I've found a sledgehammer and knobbling post to work quite well. At the very least, it discourages the developer from writing any more programs that can't be automated.
    – womble
    Jul 19, 2012 at 13:41
  • @womble - While I agree with you...it's a 3rd party app and I can't call the company and tell them to rewrite it with my personal input parameters, recompile, and send to me. I take that back, I could, but without enough cash they aren't likely to do it.
    – TheCleaner
    Jul 19, 2012 at 13:50

2 Answers 2

6

I have used AutoIT successfully years ago for such a task. It's certainly the most "prominent" of programs, I think.

1
  • 1
    And you can compile AutoIt scripts into a standalone executable and this executable can be used without the need for AutoIt to be installed on the machine. Jul 19, 2012 at 13:44
1

If the window title is consistent you can probably get by with a quick-and-dirty VBScript program using the WScript.Shell SendKeys method. Here's a simple script that illustrates the point:

Set objShell = WScript.CreateObject("WScript.Shell")

objShell.Run "calc.exe"

Do Until Success = True
    Success = objShell.AppActivate("Calculator")
    Wscript.Sleep 1000
Loop

objShell.SendKeys "94011/3="

This is a very brittle method of automation but extremely inexpensive. It works fairly well if it's running in an environment where no interactive user will be messing with the machine while the script is running.

Microsoft has some reference about how to send "special keys" on their site.

1
  • Evan, thanks, I'll test that route as well. Would I need to set some pauses/sleeps between SendKeys? Meaning if I have one input that then created output, would the next SendKeys wait for that output or immediately try to send something?
    – TheCleaner
    Jul 19, 2012 at 18:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .