Announcement

Collapse
No announcement yet.

Running an Executable File within AMS4

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Running an Executable File within AMS4

    Looking for help:

    I am using an executable file from another program within AMS. The problem I am having is that the exe file will stay open unless closed within its own program. If the user advances to the next page within AMS the exe remains open in the background. This is annoying because when the user exits AMS the exe file is still open. I there a way to force the exe file to close if the user does not complete the exe application file?

    I appreciate the help.

  • #2
    Re: Running an Executable File within AMS4

    You could use a WINDOW > CLOSE action to send it a close message (or check "force immediate termination")

    If you need to find the window first try using a WINDOW > FIND action...

    Corey Milner
    Creative Director, Indigo Rose Software

    Comment


    • #3
      Re: Running an Executable File within AMS4

      Hi Corey,
      Thanks for the advice. This will work for me, but I am having difficulty getting it to work. I am putting the command in the Page Properties Actions On Close. The window that is left open is called "DWB". If the window is not open then I get an error message when exiting because I have told the program to look for an open message. If it is open the command will terminate the program (that's what I want).

      What I need is a suggestion on how to ignore the statement if the window is not open, but to close the window if it is open. I thought I could use an IF statement similar to the one below, but I must be missing something???

      Another problem I have encountered is that this exe file may be open more than once---is there a way to force two or more instances of the open window to close?

      Thanks for the help.


      %quiz%=Window.Find("DWB")
      If(%quiz%="DWB")
      Window.Close("%quiz%","Terminate Process"
      End If

      Comment


      • #4
        Re: Running an Executable File within AMS4

        As far as the error message goes I think that is easy...

        On the window close command there is an on "error tab". Just set this to "none" so that no message is displayed if the window isn't open. You shouldn't even need the if statement then.

        Comment


        • #5
          Re: Running an Executable File within AMS4

          Thanks. That works great unless I have multiple instances of the exe file running. Do you know is a way to fix that? I tried putting in two closed window commands and that works if there are two instances open, but if there are three the last one stays open. I suppose this application could be running several times, but I want it to close when advancing to the next page in AMS. Ideas?

          Also another problem that I am having is that the windows task bar shows up on top when I launch this exe file. Does anyone know of a way to force it to stay on the bottom?

          Appreciate the help thus far.

          Thanks,
          dan

          Comment


          • #6
            Re: Running an Executable File within AMS4

            You'll have to create a find window loop I guess which keeps destroying them until ther are none left. No idea about the taskbar although it seems to me there's some ways to control it, when I used to mess around with Delphi you could make the taskbar do various things... Maybe Worm knows of a .dll manipulation.

            Corey Milner
            Creative Director, Indigo Rose Software

            Comment


            • #7
              Re: Running an Executable File within AMS4

              Thanks for the help.
              Could you give me an idea of how to start a find window loop? I'm lost there-------I would appreciate it.

              dan

              Comment


              • #8
                Re: Running an Executable File within AMS4

                Well create an IF or WHILE statement which tests for your window name, i.e that of the app you wish to close...

                Corey



                Corey Milner
                Creative Director, Indigo Rose Software

                Comment


                • #9
                  Re: Running an Executable File within AMS4

                  I found an easier way to solve my problem. By hiding the button that launches the exe file the user cannot run multiple instances of the program. When the page refreshes the button reappears with the show object command. It works great. Also, I forced termination of the program if the exe is not closed by the user by using the window find and terminate commands per your suggestion.

                  Thanks for your help,

                  dan

                  Comment


                  • #10
                    Re: Running an Executable File within AMS4

                    Excellent, much better solution...

                    Corey Milner
                    Creative Director, Indigo Rose Software

                    Comment

                    Working...
                    X