Click here for important information about

batch file to execute command in program

March 1, 2010 at 13:25:31
Specs: Windows vista
Hello, I am using a Point of Sale program that
requires me to "post" every night in order for it
to calculate end of shift sales. Every night at
11pm i basically have to go in and click a few
buttons on that program which is equal to the
following key strokes (alt-e-p-enter). Can
someone help me with the coding to do so?

See More: batch file to execute command in program

March 1, 2010 at 16:59:22
if the program is a gui (which it appears to be), unless there is a command-line option, you probably need visbasic in order to do send-keys. Maybe there's a way to send keystrokes via vbscript, but i don't know it.
Another option would be to bypass the program entirely if you have the right tools to work with the data. (ie: write a program to do what the p.o.s. program does w/out keystrokes).
Of course doing that requires some programming knowledge.

Report •

March 2, 2010 at 05:22:29
There are tools out there that simulate key pressing on GUI programs, but unless I have a need for it, I would use any other possibility to avoid it, and subsequently I have never done something like that. I think MS uses these kind of things in their MSI (installation) files. I would see if there is a way of using a command line version of the same action you are trying to perform. Just try to run the GUI program from command line, and add some or another parameters to it, see how it reacts:

C:\program files\program> myprogram.exe /?

C:\program files\program> myprogram.exe /help

C:\program files\program> myprogram.exe help

C:\program files\program> myprogram.exe show me

Report •

March 2, 2010 at 13:12:17
this program will send keys into the window specified on line one of file "control", then send the keys listed in the file into the window. If you want a compiled version i can get it to you.

open "control" for input as #1
line input #1,title
on error goto noprog
appactivate title
do while not eof(1)
line input #1,k
sendkeys (k),true
msgbox "no windows titled ";title

Report •

Related Solutions

March 3, 2010 at 12:50:55
What programming language is that, N-brane ?

Report •

March 3, 2010 at 16:28:58
visual basic (v 3.2)
i also compiled it using vb6 without modifications.
then i wrote a better one, for my own jollies, that lets you
1. start the program as maximized, icon, or regular or hidden
2 optional delays between keystrokes.

Report •

Ask Question