0

At my work I need to manually input over 500 employee numbers into this program and then grant them access to a building one at a time. This process takes me at least 2 days... by the end my brain is fried.

So I am asking, is there anyway to create a program to navigate another program's UI?

I am not asking for a tutorial to how to create this program- I am just wondering if someone could point me in the right direction on how to go about doing this.

I know C++ and am familiar with java.

I want to create a program where I can input all these numbers at once. Then the program will navigate and grant access to each employee in the program I use at work... as if I were sitting there and doing it. If you follow me.

Please let me know if you'd like me to explain further.

Appreciate it, John

S1r-Lanzelot
  • 2,206
  • 3
  • 31
  • 45
  • You may want to look into a solution using macros: http://www.jitbit.com/macro-recorder/ – Tim Jan 26 '12 at 05:07
  • 1
    *"as if I were sitting there and doing it."* Designing yourself out of a job? The AWT `Robot` can send key strokes to anywhere on-screen, but getting it to work for this would be a major effort. – Andrew Thompson Jan 26 '12 at 05:34
  • @AndrewThompson Designing himself out of a *menial* job - he probably has lots of other tasks to accomplish, and saving time on this task can help him achieve more quarterly goals, I reckon. – Tim Jan 26 '12 at 05:53
  • 2
    why not spend some time study the database of your access control system ... then you are only 1 or 2 SQL statements away from your goal – Dapeng Jan 26 '12 at 06:35

3 Answers3

1

When you say maneuver another program's UI, do you mean click buttons, enter text in the text fields, etc? It sounds like a job for Java's Robot class. According to the API:

This class is used to generate native system input events for the purposes of test automation, self-running demos, and other applications where control of the mouse and keyboard is needed.

Something like pushing KeyEvent.VK_TAB to navigate fields on the GUI might work. It's not the most elegant solution, but I hope that gets you going in the right direction.

styfle
  • 22,361
  • 27
  • 86
  • 128
1

How about using AutoHotKey or AutoIt? To choose between both: Choosing a Windows Automation script language. Autoit vs Autohotkey.

Community
  • 1
  • 1
Luc Touraille
  • 79,925
  • 15
  • 92
  • 137
0

I did something like this once using Visual Basic. It has a SendKeys function. For some reason, I could never get it working with C++, so I just went with VB. (Which I didn't know, but it's not too hard to figure out for "I'm the only one who's ever going to use it" code.)

Most of the menu commands, I'd get to with the keyboard shortcut. Lots of tabs through UI elements, that kind of thing.

Michael
  • 1,022
  • 6
  • 7