Announcement

Collapse
No announcement yet.

stop audio from external window

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

  • stop audio from external window

    I have a project built that loads and audio file when it open and external application (because the app doesn't support audio), everything runs fine but when you close the external app the audio continues to play, how does one stop this audio when it returns to am4?

    thanks

  • #2
    Re: stop audio from external window

    Use Window.Find
    and Window.Close

    Comment


    • #3
      Re: stop audio from external window

      thanks but the application I am calling doesn't show a title bar to search on as it is windowless

      Comment


      • #4
        Re: stop audio from external window

        I would even settle for simply auto launching the application and launching the mp3 file then when closing the app to shut down the audio, as a last resort........can't seem to do this either because the window has no title.....I am calling a borderless .exe file

        any clues?

        Comment


        • #5
          Re: stop audio from external window

          When the app you want to shutdown is running, set something within your AMS app up so you can get the titles of all windows. Look throught the windows, and chances are you'll be able to figure out the name of the window to close down.


          %WndTitles% = Window.GetTitles
          %Result% = Dialog.MessageBox ("Title", "%WndTitles%", Ok, Question)

          Comment


          • #6
            Re: stop audio from external window

            sorry for being so dense here but where to I plug in the
            %Result% = Dialog.MessageBox ("Title", "%WndTitles%", Ok, Question)

            I can add the %WndTitles% from the existing menu pick actions but I don't see where to add in the second in of code?

            will there be a dialog box showing me the titled windows when they run?

            thanks

            Comment


            • #7
              Re: stop audio from external window

              Put it anywhere you want. Once you've launched the external app, click the Label/Image or whatever you choose to put the code behind to get the list of windows currently open.

              Comment


              • #8
                Re: stop audio from external window

                ok, I have a screenshot of the data

                http://www.promomeals.com/am4/whichwindow.jpg

                how do I decipher the window name? it is the window right behind the dialog box as shown.

                this is a learning experience.......

                Comment


                • #9
                  Re: stop audio from external window

                  the program name is "test" if that helps

                  Comment


                  • #10
                    Re: stop audio from external window

                    Close Down all the windows you can so that there aren't as many Window Titles to choose from. From there, its going to be a guessing game. Just try closing windows until you get the right one.

                    Comment


                    • #11
                      Re: stop audio from external window

                      ahhhhh....ok.... a simple task [img]/ubbthreads/images/icons/frown.gif[/img]

                      as a test I tried closing the standard AutoMedia Application window (as the name states) and it says it can't find it.......that doesn't sound good........

                      thanks

                      Comment


                      • #12
                        Re: stop audio from external window

                        There is a built in variable for the AMS window %MenuHWnd%. If your window does not have a border, you should still be able to find the name of the window by looking at the Start Bar. That should show you the title of the window there.
                        TJ-Tigger
                        "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
                        "Draco dormiens nunquam titillandus."
                        Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

                        Comment

                        Working...
                        X