Execute Program Commands

Call to commands in other programs

Page 1 of 1

1 Replies - 1903 Views - Last Post: 04 March 2009 - 01:57 PM Rate Topic: -----

#1 bmcginnis  Icon User is offline

  • D.I.C Head

Reputation: 8
  • View blog
  • Posts: 130
  • Joined: 21-February 09

Execute Program Commands

Posted 04 March 2009 - 01:41 PM

First off I would like to say that I have very basic knowledge of C++ and Java so if you know how to answer my question in Java that's good too.

I'm wondering how people make programs that execute certain commands in other programs. What I mean by this is a program that when told to, clicks a button in another program. I used the term clicks because I'm not sure how else to describe it. It doesn't literally move the mouse and click, just someone executes the button.

I wish I could provide a code attempt but I really have no idea where to start. Any ideas or am I making no sense?

Is This A Good Question/Topic? 0
  • +

Replies To: Execute Program Commands

#2 horace  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 291
  • View blog
  • Posts: 1,900
  • Joined: 25-October 06

Re: Execute Program Commands

Posted 04 March 2009 - 01:57 PM

View Postbmcginnis, on 4 Mar, 2009 - 07:41 PM, said:

First off I would like to say that I have very basic knowledge of C++ and Java so if you know how to answer my question in Java that's good too.

I'm wondering how people make programs that execute certain commands in other programs. What I mean by this is a program that when told to, clicks a button in another program. I used the term clicks because I'm not sure how else to describe it. It doesn't literally move the mouse and click, just someone executes the button.

I wish I could provide a code attempt but I really have no idea where to start. Any ideas or am I making no sense?

you can use the system() function to run another program
http://www.cplusplus...lib/system.html
and pass it paramaters on the command line.

If a program is ruuning you can use pipes to communicate with it
http://msdn.microsof...781(VS.85).aspx
http://tldp.org/LDP/lpg/node11.html

or you can use TCP or UDP sockets
http://java.sun.com/...kets/index.html

so when you click a button in your program it sends a message to another program to carry out some action

This post has been edited by horace: 04 March 2009 - 01:59 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1