Applescript: Having an Icon the Causes the Script to Run

Discussion in 'macOS' started by JShus81, Jan 24, 2010.

  1. JShus81 macrumors newbie

    Joined:
    Jan 24, 2010
    #1
    Hello, I am relatively new to the whole Apple and iMac community. I am slowly learning though. Any way, my question is: I have a script that causes Safari to open a new window every time I click the icon on the dock instead of opening the Safari window that may already be opened and running in the background. What I cant figure out is how to make my Applescript an application represented by an icon on the dock, and when i click the icon, it just runs with no editor opening or running in the background or ne thing like that. I tried making the script an app by putting a '.app' suffix, but when i tried to run it afterward I got "You cannot open that application NewWindowScript because the Classic environment is no long supported." So far I have no new ideas about what to try now. Any ideas? Thanks.
     
  2. andmr macrumors member

    Joined:
    Aug 25, 2008
    Location:
    NE Florida
    #2
    You might try right-clicking or Control-clicking on the script's icon and select Get Info. Remove the .app extension the info window's Name & Extension field. The script should return to its previous state -- a compiled 0S X script. Try double-clicking on the script so that it opens in the Script Editor. From Script Editor's File menu select Save As > File Format: application, and leave the Options unchecked. The resulting script applet can be placed in the Dock and should run from there without opening the Script Editor. Hope this helps.
     
  3. JShus81 thread starter macrumors newbie

    Joined:
    Jan 24, 2010

Share This Page