4 Replies Latest reply on Mar 21, 2012 11:39 PM by RonK

    Cannot use AppleScript saved as application bundle in send event

    wass

      Title

      Cannot use AppleScript saved as application bundle in send event

      Post

      I have an AppleScript that has been saved as an Application Bundle (ie a Universal Binary). Using FileMaker Pro 9 Advanced I cannot use this script as a target for send event. If I open options for send event and then press "Specify application...", chose the created AppleScript app in the open file dialog, it will not show up as the specified application. If I save the AppleScript as an ordinary application (not bundle) it works, but I don't want to run the script under Rosetta on Intel Macs. Is it possible to use an AppleScript application bundle?

        • 1. Re: Cannot use AppleScript saved as application bundle in send event
          TSGal

          wass:

           

          Thank you for your post.

           

          FileMaker Pro is looking for an Applescript application; not a bundle.

           

          I would suggest entering this as a feature request at:

           

          http://www.filemaker.com/company/feature_request.html

           

          I could easily copy and paste your post into this form, but there are questions asked here that only you can answer.  In addition, please explain why this is needed.  That is, give a real life example, and explain how this is stopping you from doing your job.  Our Product Marketing and Development departments look at these requests daily, and from past experience, they tend to pay more attention to those requests with examples.

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: Cannot use AppleScript saved as application bundle in send event
            danshockley

            This is no longer a feature request - it is now a bug report. 

            Why?  You can no longer create "non-bundle" AppleScript applets in Mac OS X 10.6 (Snow Leopard). When you save an AppleScript, there is only one "Application" option, and it saves as a modern Mac OS X bundled application (which, by the way, is what FileMaker Pro is, as well). 

            So, please re-open this issue and report it as a bug. 

            For a real-world example, see my comment on another thread: http://forums.filemaker.com/posts/df3f5b2f9e#127613

            Basically, there are things you can no longer do in Snow Leopard, since "Perform AppleScript" blocks certain actions in FileMaker, and "Send Event" to an external AppleScript application is the only way to get things done. 

            • 3. Re: Cannot use AppleScript saved as application bundle in send event
              dave_lmc

              I agree this is now a bug and it is causing a lot of problems at our site as we upgrade machines.

              I have found what I believe is a work around for most situtations, though it isn't particularly pretty:  instead of using send event to just open an application, you can use the perform applescript with 'do shell script' to open the application bundle.  The perform applescript step appears to complete as soon as the shell script 'open' command completes, so FileMaker operations (and hence interactions with the running applescript application) can continue.

              Thus, in perform applescript, just put:  

              do shell script "open \"my full path to application/my application bundle.app\""

              • 4. Re: Cannot use AppleScript saved as application bundle in send event
                RonK

                To work around this I use the, script step "Perform AppleScript", and call the script I want to run

                tell application "Finder"

                open alias "Macintosh HD:Dated_Temps:Posting_Tools:Password_Protected_File_Posting:Password_Protected_Script_(No_new_file).app"

                end tell

                See attached screenshot, hope this helps..