0 Replies Latest reply on Dec 22, 2010 2:19 PM by TimothyHall

    Embedding runtimes in an applescript



      Embedding runtimes in an applescript


      I am embedding a filemaker runtime solution in an apple script - so users don't have to see all the runtime files - which only serves to confuse non-filemaker users because of all the support files that are needed by the runtime itself.

      On searching the web for a solution, I came across a method, using applescript, where a script is saved as an application and the runtime solution is imbedded inside it's package.

      If you want to see how to do this, see this short (4 min 15 sec) screen capture movie.
      NOTE: the problems I am having with this method are also discussed here as well..


      In brief, the problems I'm seeking an answer to here are:

      1. When the Applescript App I created is placed in the Apple Dock, and launched - a second (runtime) icon is spawned there - and I do not want there to be two icons in the dock.
      2. Of these two dock icons, one of them (the Applescript App's icon) does not provide a "Quit" option when option or right clicked for the user.
      3. When command-tab is used, the Application Switcher shows only the Runtime icon - not the Applescript App's icon.

      So it would seem the best solution would be to somehow force the Runtime icon in the doc to be hidden, and to change the switcher's icon to look the same as the one applied to the "App"'s icon - and to somehow add the "Quit" option to the "App" in the dock.

      I assume this would require that changes be made to one or both info.plist files.

      Though I am not sure how to do this.

      If anyone can tell me how, I would be most grateful.

      By the way..
      Here's the applescript code for anyone interested..

      -- Mac path to a hidden sript file in the bundle
      sethiddenscriptpathto (((path tome) astext) & "Contents:Resources:MySongApp:MySongApp.app")
      -- Converting the Mac path to a Posix path
      set hiddenscriptpath to POSIX path of hiddenscriptpath
      -- Quoting the Posix path
      set qtdhiddenscriptpath to quoted form of hiddenscriptpath
      -- executing the script file
       set command to "open " & qtdhiddenscriptpath
       do shell script command