Thread: Controlling an unknown program

  1. #1
    Registered User
    Join Date
    Feb 2005
    Posts
    22

    Controlling an unknown program

    I am currently working on a college project which needs me to control an external program that I have downloaded, with a GUI program that I have written. I am not sure exactly how to approach this since my efforts to get this working seem to have been in vain.

    All I need to do is send simple messages like button clicks to the external program's controls. This on it's own is not difficult, I was able to send messages between two test programs that I have written where I know all the control ID's. Where I get stuck is finding these ID's on the external program. I've tried spy++ programs but all they give is the thread and that changes every time the program is opened.

    Is there a better way to accomplish this task or am I going in the right direction and just need a few pointers on how to get this job done?

    Please, I want as many opionions as possible, this is costing me valuable project time being stuck at such a trivial problem.

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Spy++ can give you the IDs, class names and titles of windows...
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Registered User
    Join Date
    Feb 2005
    Posts
    22
    The control ID's are always the same as the thread ID's when I check them with spy++, therefore, since the threads are always changing so are the ID's... I was wondering if there was a better way to do this...

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Strange. Very strange. What program is that you're trying to control?
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 12:27 PM
  2. BOOKKEEPING PROGRAM, need help!
    By yabud in forum C Programming
    Replies: 3
    Last Post: 11-16-2006, 11:17 PM
  3. Can someome help me with a program please?
    By WinterInChicago in forum C++ Programming
    Replies: 3
    Last Post: 09-21-2006, 10:58 PM
  4. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM