Other programs

This is a discussion on Other programs within the C++ Programming forums, part of the General Programming Boards category; Is it possible to write a program that gives commands to other programs than itself? Thanks -Chris...

  1. #1
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052

    Thumbs up Other programs

    Is it possible to write a program that gives commands to other programs than itself?

    Thanks
    -Chris

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Probably.

    I guess that's as much as I can say without knowing any more details.

    You must learn to be more specific with your questions. Your question might just as well be "Can I control a video with a remote control?". Answer again is "Probably". It may be a video with remote control possibilities, it may not. The remote control may have the right buttons on it, maybe not. The remote may speak the same signalling language as the video, it may not... get my point?
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    i'll give you an example: to write a program that tells a program like napster to search a specified list of songs and download them, or that tells a program like Internet Explorer to open up a new browser and open the url: www.cprogramming.com/cboard

  4. #4
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    You can run other programs. You can also pass some arguements to a program (depending on the program) which is where the "probably" answer comes in. It is possible to talk to IE with a program but in the case of your example it would be easier for you to write your own code that tells the modem to dial-up and then d/l an html file, mp3, whatever it is that you want to do. That will require learning how to use winsock.

  5. #5
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    Where would I learn about winsock?

  6. #6
    Unregistered
    Guest

    winsock tutorials

    UNIX Network Porgramming - Volume One

    UNIX you say? This is one of, if not the best socket book you'll find. WINSOCK uses bsd4.3 at heart in any case, there's only a few differances that are easy to walk around.
    It's a good cover to cover read, but it's also a great referance source. As I said, there's only some small differances in the architecture, but MSDN Library covers them "pretty" well.

    Goodluck.

  7. #7
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    http://world.std.com/~jimf/papers/sockets/winsock.html

    As it says itself, a quick and dirty primer.

    Automating web sites is very difficult mind. There is not a standard web site. Web designers call things whatever they like, and are apt to change them around at whim. Seeing a button called "Browse" and working out how to get a web site to react to your program will not make "Browse" buttons on other web sites work.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  8. #8
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    How would I write a program that gives commands to another program (to a program that is ABLE to recieve commands from other programs. Or isn't this possible? If not, how would I do this another way...?)

    Thanks
    -Chris

  9. #9
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    If a program has been written to be "remote controlled" it will either publish an API that a programmer can use, or it will conform to one of the standard automation protocols, (OLE, COM etc.), or there are a few other possibilities.

    The COM approach is more common now, at least in the Windows world. You have probably seen this without even thinking about it, when you use certain web sites that have documents in PDF format and you click on it, up pops a Adobe. This does not mean Adobe is built into IE, rather, IE is automating Adobe to view the document, (you quite often see things like spreadsheets and databases popping up in the browser as well, this is the same technique).

    In actual fact, there is even more to it than this, (plug-in's etc.), these are advanced topics, that require a lot of understanding, of the OS, of processes and process controls, synchronisation, inter process communication etc. etc.

    I do not wish to put you off, but having read, and answered some of your other questions, I do not believe you should be even thinking about this stuff yet.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  10. #10
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    Alright. Thanks. I know that i'm a bit of a newbie (i'm A BIG NEWBIE, well, not that BIG), but i'm sorta got all these things that i'm curious about in C++ but I guess i'll need to learn more before I get into the advanced stuff

  11. #11
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    It's perhaps useful to point out that these are OS and application techniques, i.e. NOT C++ techniques. You can use C++ to acheive these things but that is not mandatory. It is my strong belief that COM for example, is a hundred times easier to code with Delphi than C++......
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Recommend upgrade path for C programs
    By emanresu in forum C Programming
    Replies: 3
    Last Post: 11-22-2007, 06:32 AM
  2. How come Dev C++ cant run some programs??
    By Sephiroth in forum C Programming
    Replies: 41
    Last Post: 09-17-2005, 05:35 AM
  3. Way to get the current open programs displayed?
    By CPPguy1111 in forum C++ Programming
    Replies: 6
    Last Post: 06-22-2005, 12:24 AM
  4. POSIX/DOS programs?
    By nickname_changed in forum C++ Programming
    Replies: 1
    Last Post: 02-28-2003, 04:42 AM
  5. executing c++ programs on the web
    By gulti01 in forum C++ Programming
    Replies: 4
    Last Post: 08-12-2002, 03:12 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21