Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Help with External Application Interfacing

Help with External Application Interfacing

Scheduled Pinned Locked Moved C / C++ / MFC
collaborationhelptutorialquestionlearning
18 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    James A Beggs
    wrote on last edited by
    #1

    Hi there. I'm a professional IT guy working as a Test Engineer. I've done a smidgeon of development, but I'm really junior level in that area, and all I've really done is stand alone application development, so I have a lot of skills I need to work on. What I'm trying to do is learn how to write an application that can call other applications and manipulate them; in other words, open up an application, do the effect of a "File-Open" command in that application, etc. And I have no idea where to begin learning these things. Can anyone shove me in the right direction? :) Thanks! James A Beggs Microsoft MSN Windows CE Platform Builder Test Team

    D J 2 Replies Last reply
    0
    • J James A Beggs

      Hi there. I'm a professional IT guy working as a Test Engineer. I've done a smidgeon of development, but I'm really junior level in that area, and all I've really done is stand alone application development, so I have a lot of skills I need to work on. What I'm trying to do is learn how to write an application that can call other applications and manipulate them; in other words, open up an application, do the effect of a "File-Open" command in that application, etc. And I have no idea where to begin learning these things. Can anyone shove me in the right direction? :) Thanks! James A Beggs Microsoft MSN Windows CE Platform Builder Test Team

      D Offline
      D Offline
      dazinith
      wrote on last edited by
      #2

      as far as i understand this cant be done unless the application you are working with supports automation.. in other words it has to be written specifically to allow you to send it messages that it responds to.. on the other hand, most windows applications will take a filename as a first parameter, so if you are just opening a file it would be 'notepad myfile.txt', of course that would require that the program be written to look for this as well.. still a newb.. cut me some slack :P -dz

      J 1 Reply Last reply
      0
      • D dazinith

        as far as i understand this cant be done unless the application you are working with supports automation.. in other words it has to be written specifically to allow you to send it messages that it responds to.. on the other hand, most windows applications will take a filename as a first parameter, so if you are just opening a file it would be 'notepad myfile.txt', of course that would require that the program be written to look for this as well.. still a newb.. cut me some slack :P -dz

        J Offline
        J Offline
        James A Beggs
        wrote on last edited by
        #3

        Hm; I gather it differently. Certainly, I understand what you are saying, in terms of calling the software directly, but also, you can write a program that will send keystrokes and mouse activity to a window thats active, right? James A Beggs Microsoft MSN Mobile Component Test Team

        D 1 Reply Last reply
        0
        • J James A Beggs

          Hi there. I'm a professional IT guy working as a Test Engineer. I've done a smidgeon of development, but I'm really junior level in that area, and all I've really done is stand alone application development, so I have a lot of skills I need to work on. What I'm trying to do is learn how to write an application that can call other applications and manipulate them; in other words, open up an application, do the effect of a "File-Open" command in that application, etc. And I have no idea where to begin learning these things. Can anyone shove me in the right direction? :) Thanks! James A Beggs Microsoft MSN Windows CE Platform Builder Test Team

          J Offline
          J Offline
          Joe Woodbury
          wrote on last edited by
          #4

          Three are ways to do this, but you are better off buying a test program already designed to do such things. Of course, it's likely that despite all the rhetoric your boss doesn't actually believe in testing so this will likely never happen.

          J J 2 Replies Last reply
          0
          • J James A Beggs

            Hm; I gather it differently. Certainly, I understand what you are saying, in terms of calling the software directly, but also, you can write a program that will send keystrokes and mouse activity to a window thats active, right? James A Beggs Microsoft MSN Mobile Component Test Team

            D Offline
            D Offline
            dazinith
            wrote on last edited by
            #5

            ah.. ya i guess that might be a possibility.. dunno.. good luck tho still a newb.. cut me some slack :P -dz

            1 Reply Last reply
            0
            • J Joe Woodbury

              Three are ways to do this, but you are better off buying a test program already designed to do such things. Of course, it's likely that despite all the rhetoric your boss doesn't actually believe in testing so this will likely never happen.

              J Offline
              J Offline
              J Dunlap
              wrote on last edited by
              #6

              There are a number of ways to do it: Named Pipes (I have an example of this if you're interested) Semaphores (Global memory which is managed by a "semaphore" which makes the threads wanting to use the memory "wait in line") Windows Messages (register your own, do WM_COPYDATA, or, yes, you can send mouse messages and keystrokes) If you didn't create the app and it doesn't do OLE, you'll have to send keystrokes.

              "Do unto others as you would have them do unto you." - Jesus
              "An eye for an eye only makes the whole world blind." - Mahatma Gandhi

              J 1 Reply Last reply
              0
              • J J Dunlap

                There are a number of ways to do it: Named Pipes (I have an example of this if you're interested) Semaphores (Global memory which is managed by a "semaphore" which makes the threads wanting to use the memory "wait in line") Windows Messages (register your own, do WM_COPYDATA, or, yes, you can send mouse messages and keystrokes) If you didn't create the app and it doesn't do OLE, you'll have to send keystrokes.

                "Do unto others as you would have them do unto you." - Jesus
                "An eye for an eye only makes the whole world blind." - Mahatma Gandhi

                J Offline
                J Offline
                James A Beggs
                wrote on last edited by
                #7

                I didn't create it; and I'm not sure if it does OLE; perhaps the devs here can tell me - if they will take the time out for it. I'm guessing that the Windows Messages would be best way all total (I'm reading up on win32 APIs, FindWindow function, and other stuff. But I would be interested in your Named Pipes example, and any thoughts on which of these is the best approach and why, would be great. James A Beggs Microsoft MSN Mobile Component Test Team

                J 1 Reply Last reply
                0
                • J Joe Woodbury

                  Three are ways to do this, but you are better off buying a test program already designed to do such things. Of course, it's likely that despite all the rhetoric your boss doesn't actually believe in testing so this will likely never happen.

                  J Offline
                  J Offline
                  James A Beggs
                  wrote on last edited by
                  #8

                  Actually, my boss DOES believe in testing - thats what I'm here for, to test. The problem is that I'm a short term contracter here, and I have been doing short term contracts for 3 years. My boss just told me that one of the ways to go full time is to show my ability to code, and suggested this route. I'd actually like to be either a Dev in Test or a Developer, and I do have a BS in Computer science and some coding skills, but as I said before, I never worked with other people's apps, or wrote apps to work with other apps; all stand alone stuff, and for the last three years all I could land is testing positions. I fear my skills will be degrading. I'm going to have to work harder at self-education to get myself up to speed. :( James A Beggs Microsoft MSN Mobile Component Test Team

                  J J 2 Replies Last reply
                  0
                  • J James A Beggs

                    Actually, my boss DOES believe in testing - thats what I'm here for, to test. The problem is that I'm a short term contracter here, and I have been doing short term contracts for 3 years. My boss just told me that one of the ways to go full time is to show my ability to code, and suggested this route. I'd actually like to be either a Dev in Test or a Developer, and I do have a BS in Computer science and some coding skills, but as I said before, I never worked with other people's apps, or wrote apps to work with other apps; all stand alone stuff, and for the last three years all I could land is testing positions. I fear my skills will be degrading. I'm going to have to work harder at self-education to get myself up to speed. :( James A Beggs Microsoft MSN Mobile Component Test Team

                    J Offline
                    J Offline
                    Joe Woodbury
                    wrote on last edited by
                    #9

                    How about if you show your boss that you can save the company lots of money by buying a testing application rather than writing one? The problem is test bosses tend to talk alot about how they believe in testing and hire lots of people to prove it, but you can't get them to spend a dime on software to actually help with the testing. (Sometimes, you can't even get them to buy bug reporting software, though that also involves engineering and support.) The best proof of a good tester isn't an ability to code, but an ability to find bugs--your goal should be to prove that developers are idiots. And when the developers claim to have fixed the bugs, to show all the other crap they broke while doing so. (One place where I want testers who know how to program is when testing APIs and class libraries, but that's fairly specialized. The problem with writing test software specific to an application is just that; it's specific to an application. On the negative side, it also tends to cause testers to limit their scope of testing to those things which can be scripted instead of the myriad of idiotic amazing things users actually do. On the positive side, it's a good way to do regression testing.)

                    J 1 Reply Last reply
                    0
                    • J James A Beggs

                      I didn't create it; and I'm not sure if it does OLE; perhaps the devs here can tell me - if they will take the time out for it. I'm guessing that the Windows Messages would be best way all total (I'm reading up on win32 APIs, FindWindow function, and other stuff. But I would be interested in your Named Pipes example, and any thoughts on which of these is the best approach and why, would be great. James A Beggs Microsoft MSN Mobile Component Test Team

                      J Offline
                      J Offline
                      Joe Woodbury
                      wrote on last edited by
                      #10

                      James A Beggs wrote: I'm guessing that the Windows Messages would be best way all total (I'm reading up on win32 APIs, FindWindow function, and other stuff. It's a terrible way since you can't inject messages into another application and even if you could, it's not how users use the software. Testing software will mimic keystrokes, mouseclicks and mouse moves. (And what if the software actually examines what keys are currently pressed?)

                      J 1 Reply Last reply
                      0
                      • J James A Beggs

                        Actually, my boss DOES believe in testing - thats what I'm here for, to test. The problem is that I'm a short term contracter here, and I have been doing short term contracts for 3 years. My boss just told me that one of the ways to go full time is to show my ability to code, and suggested this route. I'd actually like to be either a Dev in Test or a Developer, and I do have a BS in Computer science and some coding skills, but as I said before, I never worked with other people's apps, or wrote apps to work with other apps; all stand alone stuff, and for the last three years all I could land is testing positions. I fear my skills will be degrading. I'm going to have to work harder at self-education to get myself up to speed. :( James A Beggs Microsoft MSN Mobile Component Test Team

                        J Offline
                        J Offline
                        J Dunlap
                        wrote on last edited by
                        #11

                        Some tips for sending input: >Use keybd_input for Win95, and SendInput for >=Win98 >For activating the window, don't try the FindWindow function unless you know either the full class name or the full title of the window, and the exact case of all the letters in it. If you don't know either of these, make your own using EnumWindows().

                        "Do unto others as you would have them do unto you." - Jesus
                        "An eye for an eye only makes the whole world blind." - Mahatma Gandhi

                        J 2 Replies Last reply
                        0
                        • J Joe Woodbury

                          James A Beggs wrote: I'm guessing that the Windows Messages would be best way all total (I'm reading up on win32 APIs, FindWindow function, and other stuff. It's a terrible way since you can't inject messages into another application and even if you could, it's not how users use the software. Testing software will mimic keystrokes, mouseclicks and mouse moves. (And what if the software actually examines what keys are currently pressed?)

                          J Offline
                          J Offline
                          James A Beggs
                          wrote on last edited by
                          #12

                          Well then, what would you suggest? I need to write code to mimic the keystrokes. And no, I don't need to buy it; they are looking for me to prove I can develop software, not that I can make wise choices on buying it. Otherwise, it isn't going to help me for where I want to go and need to be. James A Beggs Microsoft MSN Mobile Component Test Team

                          J 1 Reply Last reply
                          0
                          • J Joe Woodbury

                            How about if you show your boss that you can save the company lots of money by buying a testing application rather than writing one? The problem is test bosses tend to talk alot about how they believe in testing and hire lots of people to prove it, but you can't get them to spend a dime on software to actually help with the testing. (Sometimes, you can't even get them to buy bug reporting software, though that also involves engineering and support.) The best proof of a good tester isn't an ability to code, but an ability to find bugs--your goal should be to prove that developers are idiots. And when the developers claim to have fixed the bugs, to show all the other crap they broke while doing so. (One place where I want testers who know how to program is when testing APIs and class libraries, but that's fairly specialized. The problem with writing test software specific to an application is just that; it's specific to an application. On the negative side, it also tends to cause testers to limit their scope of testing to those things which can be scripted instead of the myriad of idiotic amazing things users actually do. On the positive side, it's a good way to do regression testing.)

                            J Offline
                            J Offline
                            James A Beggs
                            wrote on last edited by
                            #13

                            This is something I can do if I wanted to remain a tester; I don't. I want to do development; or, development in test. And for that, I need to prove my programming skills; it wont do much if I have other people's software do it for me! :) James A Beggs Microsoft MSN Mobile Component Test Team

                            1 Reply Last reply
                            0
                            • J J Dunlap

                              Some tips for sending input: >Use keybd_input for Win95, and SendInput for >=Win98 >For activating the window, don't try the FindWindow function unless you know either the full class name or the full title of the window, and the exact case of all the letters in it. If you don't know either of these, make your own using EnumWindows().

                              "Do unto others as you would have them do unto you." - Jesus
                              "An eye for an eye only makes the whole world blind." - Mahatma Gandhi

                              J Offline
                              J Offline
                              James A Beggs
                              wrote on last edited by
                              #14

                              what about for windows 2K and XP? :) James A Beggs Microsoft MSN Mobile Component Test Team

                              J 1 Reply Last reply
                              0
                              • J James A Beggs

                                Well then, what would you suggest? I need to write code to mimic the keystrokes. And no, I don't need to buy it; they are looking for me to prove I can develop software, not that I can make wise choices on buying it. Otherwise, it isn't going to help me for where I want to go and need to be. James A Beggs Microsoft MSN Mobile Component Test Team

                                J Offline
                                J Offline
                                Joe Woodbury
                                wrote on last edited by
                                #15

                                James A Beggs wrote: Well then, what would you suggest? I need to write code to mimic the keystrokes. Don't remember. I did this once years ago and have never done it since. It was on Windows 3.11, but it would have worked on Windows 9x. It wouldn't have worked on NT/2K/XP due to how the input queues have changed.

                                1 Reply Last reply
                                0
                                • J James A Beggs

                                  what about for windows 2K and XP? :) James A Beggs Microsoft MSN Mobile Component Test Team

                                  J Offline
                                  J Offline
                                  J Dunlap
                                  wrote on last edited by
                                  #16

                                  What I meant was Win98 or above, including 2K and XP

                                  "Do unto others as you would have them do unto you." - Jesus
                                  "An eye for an eye only makes the whole world blind." - Mahatma Gandhi

                                  J 1 Reply Last reply
                                  0
                                  • J J Dunlap

                                    What I meant was Win98 or above, including 2K and XP

                                    "Do unto others as you would have them do unto you." - Jesus
                                    "An eye for an eye only makes the whole world blind." - Mahatma Gandhi

                                    J Offline
                                    J Offline
                                    James A Beggs
                                    wrote on last edited by
                                    #17

                                    Ah, ok. I misunderstood - or misread. James A Beggs Microsoft MSN Mobile Component Test Team

                                    1 Reply Last reply
                                    0
                                    • J J Dunlap

                                      Some tips for sending input: >Use keybd_input for Win95, and SendInput for >=Win98 >For activating the window, don't try the FindWindow function unless you know either the full class name or the full title of the window, and the exact case of all the letters in it. If you don't know either of these, make your own using EnumWindows().

                                      "Do unto others as you would have them do unto you." - Jesus
                                      "An eye for an eye only makes the whole world blind." - Mahatma Gandhi

                                      J Offline
                                      J Offline
                                      James A Beggs
                                      wrote on last edited by
                                      #18

                                      And how do I identify the window I need from the others I don't with EnumWindows()? James A Beggs Microsoft MSN Mobile Component Test Team

                                      1 Reply Last reply
                                      0
                                      Reply
                                      • Reply as topic
                                      Log in to reply
                                      • Oldest to Newest
                                      • Newest to Oldest
                                      • Most Votes


                                      • Login

                                      • Don't have an account? Register

                                      • Login or register to search.
                                      • First post
                                        Last post
                                      0
                                      • Categories
                                      • Recent
                                      • Tags
                                      • Popular
                                      • World
                                      • Users
                                      • Groups