"Press Run to tun this script, or Quit to quit." dialog
  • I've just encountered this for the first time. I've bound my "Safari Embedded Media Launcher" applescript (from my website) to Ctrl-Cmd-M, and when I use the hotkey to launch it, I get this dialog:

    Safari Embedded Media Launcher
    Press Run to tun this script, or Quit to quit.
    [Quit] [Run]

    When I select the script with the mouse from the FastScripts menu or double-click it in the Finder, it doesn't prompt me with this dialog. Only when I use the hotkey.

    Do you know why this is happening, and how I can get it to stop prompting me?

    Also, is it just my imagination, but does it now take longer to launch scripts with the latest version of FastScripts (2.2.6)? It seems to go a bit slower than the last version.

    Thanks for any insights!

    - Cowboy
  • Hi Cowboy - that's very strange, because the dialog you're seeing is normally only seen when you save a script as both an application and with "startup screen" checked in the save dialog (in Script Editor).

    As far as I know there is no way around that startup dialog *if* you've saved a script with it enabled. I'm curious if there might be some configuration situation on your machine such that a different script is actually being run when you hit the shortcut vs. the menu selection.

    Here's something to try: invoke the script with the keypress to get the dialog ("Run or Quit"). While this dialog is displayed, I am willing to bet that your script is being run as an application, and that an icon will appear for it in the Dock. Find that icon in the dock and Cmd-Click on it, which will reveal the script file in the Finder. Is this is in the same location as the one you are selecting from the menu, etc? Go back to the script and quit it. Now double-click the item that was revealed in the Finder. If it *doesn't* produce the same dialog, I'm very curious to have a look at it. Maybe you can send me that particular file so we can be assured that I have the file compiled in the same way, etc.

    As for the speed question, I don't think anything has changed for the worse in 2.2.6, but there's always the possibility that I'm missing something. If you can identify a particular type of script that is slower, it might help. For instance, if you're always saving your scripts as applications, then the script launching time is largely an application-launch issue. The speed that FastScripts is able to add by caching the AppleScript code in memory is lost when the script is launched as its own application. I did make a change in 2.2.3 where I started treating AppleScript applications as true applications. Previous to that, I would extract the script code out of the application and run it natively from FastScripts. This could have made things faster, but it was at the expense of some desired benefits of running as an application.

    For maximum speed I suggest saving all scripts as "compiled scripts," not as "application."
  • Ok. Initially, I had everything saved as compiled scripts and it worked nice and fast. I recently lost my hard drive and when I reinstalled, I resaved my scripts as applications, not realizing that I did anything differently.

    I just changed them all over to compiled scripts, and everything works as before. Nice and fast, and no extra dialogs!

    Thanks for the help. :-)

    - Cowboy
  • Great news, Cowboy! Thanks for the update. By the way, I didn't realize you were in Waltham. Howdy, neighbor!

    Daniel
  • Just a followup to my original post.. Whenever I run an AppleScript saved as an application (very seldom), even if "Startup Screen" is unchecked, it still prompts me:

    ..Script Name..
    Press Run to tun this script, or Quit to quit.
    [Quit] [Run]

    But only when I use a hotkey to trigger it. When I use the FastScripts menu, I get no such prompt.

    (using FastScripts 2.2.6)

    - Cowboy
  • Hi Cowboy - I just wrote a test script to try this out, and can't reproduce the behavior you're seeing. Is it at all possible that they hotkey you're setting is somehow set to a different copy of the script (one saved with the "Startup Screen" option enabled?

    FastScripts doesn't have a "Press Run to Run..." dialog, so the dialog must be coming from the script application itself. What I'd do is follow my suggestions in post #2 above about running the script and then locating the original by cmd-clicking the dock icon.

    Let me know if you discover any other clues as to what might be going on.

    Daniel
  • Your second post gave me the clue I needed to figure this out.

    When you run a Script Application with the Control key held down, it presents the dialog even if it was saved without the option for the startup screen.

    So you need to make sure that when the script gets run, you're no longer holding the control key down :) Maybe a shortcut for this item without the control key involved.

    Daniel
  • Thanks! This has been driving me crazy. It has nothing to do with FastScripts it also happens when I use Better TouchTool as a hockey trigger.
Start a New Discussion

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!