Announcement

Collapse
No announcement yet.

Window.Find

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

  • Window.Find

    Is it possible to do a window.find and inhibit the close button? Eg, a separate executable launching (not APMS), with a (flash controlled [1x1 px], not a Flash executable) fscommand at the end to start the actual application. Just want to be able to prevent them from exiting the executable prematurely, then having to wait for the fscommand. I know it's probably easy, but I can't think of a way to do it.

    Or another option that - if they do hit the close button, it would then launch the (APMS) application right away. Either one of these would be fine. Thanks!
    Regards,

    -Ron

    Music | Video | Pictures

  • #2
    Re: Window.Find

    Nobody has a clue? Or is the question confusing?
    Regards,

    -Ron

    Music | Video | Pictures

    Comment


    • #3
      Re: Window.Find

      I'm not sure I understand the question fully, but the answer is yes it is possible *I think*...

      Corey Milner
      Creative Director, Indigo Rose Software

      Comment


      • #4
        Re: Window.Find

        OK, sorry. I have an "executable" that launches (a sample product) that lasts about a minute in duration before it comes to the APMS menu. They (users) have an option currently to exit this production. I would like a way to "inhibit" the exiting of this, if possible, during this showing.

        OR, a way that if the user does press "close" it launches the APMS menu immediately (rather than waiting for the fscommand at the end of the Flash file). Either way would be fine. Is there some way I can sense the "close" button being pressed or better yet, pass something that inhibits the close button in this window? This may be the question I need to ask.
        Regards,

        -Ron

        Music | Video | Pictures

        Comment


        • #5
          Re: Window.Find

          If you're first app is a AMS app, you could put code in the Project Destroy to launch your second app.

          Comment


          • #6
            Re: Window.Find

            OK so in a sentence you are trying to "disable an exit button in an .exe"?

            No way I know of to do that. If it's a Flash .exe you might be able to do it with a 3rd party Flash-hacking tool but other than that I have no solution on this one sorry, wish I could be of more help.

            As for the exit button launching your AMS app, your AMS app would already have to be open in order to detect the closing of the first app, know what I mean? So it's a chicken/egg scenario...

            If you have access to the source files for whatever nature of sample presentation this is you speak of then that would be the only *for sure* solution I can think of, just go in and alter the code on the exit button to launch your app...

            Corey Milner
            Creative Director, Indigo Rose Software

            Comment


            • #7
              Re: Window.Find

              Or, you could have an AMS app that launches your first app with the WAIT option, then launches your second app.

              Comment


              • #8
                Re: Window.Find

                Yeah I thought of that too but for some odd reason I was thinking you might have trouble with the window focus or some other bugaboo that came to mind which I can't recall right now, but now that I think about it you're right Worm, you could set the first app to minimize itself and then launch the sample app with the WAIT option and that would probably work quite well.

                Corey Milner
                Creative Director, Indigo Rose Software

                Comment


                • #9
                  Re: Window.Find

                  As for the exit button launching your AMS app, your AMS app would already have to be open in order to detect the closing of the first app, know what I mean?
                  How would I go about doing this? I set the variable as:

                  %MenuHWnd% = Window.Find ("Sample")

                  and I tried an if statement:

                  If (%MenuHWnd% = 0)
                  [start the main menu] &
                  Application.Exit

                  but this doesn't seem to work.
                  How do I "sense" the executable or "Sample" closing as you stated earlier, because if I can do this, it will solve my problem.
                  Regards,

                  -Ron

                  Music | Video | Pictures

                  Comment


                  • #10
                    Re: Window.Find

                    Update - I managed to figure out why the "wait" function was not working for me. The application that I was starting had an "initialization" feature and was terminating back to AMS immediately (was launching a second executable in its process). It just so happens that I found the second executable that the original looks for, and now the "wait" function works!!

                    I would still like to know how you "sense" a window closing/exiting if anyone knows. I've searched this forum to no avail. Thanks!
                    Regards,

                    -Ron

                    Music | Video | Pictures

                    Comment


                    • #11
                      Re: Window.Find

                      Well, the wait function is not working because if it's waiting for the application to terminate, it obviously can't find the window!! Grrrrrrrr!

                      So now I'm back to square one. Does anyone have any suggestions? If I use "open", and I have a way for AMS to know that you're exiting this window, this will definitely solve my problem. Thanks for any tips!!
                      Regards,

                      -Ron

                      Music | Video | Pictures

                      Comment


                      • #12
                        Re: Window.Find

                        Yeah I seemed to knwo that wouldn't work but Worm built my hopes up.

                        In the larger sense actually I was pointing out the fact that you can't "find" a window unless your app is already open so trying to use WINDOW.FIND to launch the app won't work because it would alreday have to be launched, chicken/egg scenario...

                        Like I say my advice is to get the source files. I think it's pretty much on the client to supply the correct files and supplies for what they need...

                        Corey Milner
                        Creative Director, Indigo Rose Software

                        Comment


                        • #13
                          Re: Window.Find

                          Corey, what's the variable to use to locate a window and ""sense"" the closing of it? You mentioned that in an earlier post. I will have ams running and remove the "wait" which will in turn - be able to locate it. I have a cheezy workaround (building another ams executable to Window.Find and close the windows), but would like to do it simpler. I cannot get the source code for this app; just not possible.
                          Regards,

                          -Ron

                          Music | Video | Pictures

                          Comment


                          • #14
                            Re: Window.Find

                            Well if you create a WINDOW.FIND loop which checks all open windows every so often for your app, i.e. every one second or whatever, I refer to that as "sensing" your window...

                            Corey Milner
                            Creative Director, Indigo Rose Software

                            Comment


                            • #15
                              Re: Window.Find

                              The window in question is called "Sample". I tried this and please tell me what I may be doing wrong (for future reference anyway, my cheezy workaround worked flawlessly btw):

                              %hWnd% = Window.Find ("Sample")
                              if %hWnd% = "Sample"
                              RETURN
                              ELSE
                              Application.Exit
                              End if

                              Then, I had an "On Destroy" command to continue with the main menu. It wouldn't even hesitate, even with the window up, it exited the application every time?? It wasn't waiting for it to disappear off the desktop (close). Is this not a correct "loop"??
                              Regards,

                              -Ron

                              Music | Video | Pictures

                              Comment

                              Working...
                              X