Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How can "Macros" be recorded and executed in DOS?  (Read 2896 times)

0 Members and 1 Guest are viewing this topic.

Workingstiff

  • Guest
How can "Macros" be recorded and executed in DOS?
« on: July 28, 2010, 10:30:43 AM »
I have a work process that requires some functions to be executed in a DOS* like environment. The character sets that have to be entered are long and fairly complicated. It's not difficult to enter them incorrectly. I would like to be able to record and store these complex commands as pre-programmed keys or "macros". Obviously the idea is to make the process simpler and less time consuming through improved input-speed and accuracy.

There is a wrinkle though; this process is carried out once every month. In each of the command lines there is a date field that needs to be updated every time the process is run. When the process is run, it is run at the beginning of the following month (i.e.: the month of January is run in early February).

So the questions are:

1) Can complex instructions be assigned to keyboard "macro" keys and executed in a "DOS*" environment?

2) If complex instructions can be assigned to specific keys, can the instruction sets be recorded in such a way so that certain parameters change automatically? In this case, can the month change without human input, each time the process is run?

3) How (applies to both questions)? Is there a guide, or are there specific instructions available somewhere? Does anyone here know the answers?

*I use the term DOS because that's what it looks like, however, the questions above actually pertain to the "Command" interface in Windows Vista.

Thank you.
« Last Edit: July 28, 2010, 10:49:34 AM by Workingstiff »

Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: How can "Macros" be recorded and executed in DOS?
« Reply #1 on: July 28, 2010, 03:30:38 PM »
You could try using DOSKEY which dates back to DOS.

It's been a while but I don't think you can record them, but instead you type them out and give them a name. You can also store your macros and load them when you open a cmd window.

The only documentation I could find was an old Microsoft Users Guide and Reference for DOS 5. You may have better luck with Google.

Any reason you can't write batch file(s) or VBScript(s)? There is also AutoIt, but I think that more reserved for Windows.

Good luck.  8)
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein

Salmon Trout

  • Guest
Re: How can "Macros" be recorded and executed in DOS?
« Reply #2 on: July 28, 2010, 03:51:21 PM »
You might want to look at AutoHotKey

Quote
A macro is a series of scripted actions that is "played" upon demand. The most common activity of a macro is to send simulated keystrokes and mouse clicks  to one or more windows. Such windows respond to each keystroke and mouse click as though you had performed it manually, which allows repetitive tasks to be automated with high speed and reliability.

Although macros can be written by hand, you might find it easier to write long ones with the aid of AutoScriptWriter, which is a macro recorder included with AutoHotkey. It watches what you type and where you click, and keeps track of which window is active. It transcribes these actions into a working macro that can later be "played back" at a faster speed.


here I've started you off

http://www.google.com/search?&q=autohotkey+keyboard+macros