Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.4: Two ways to bypass Spotlight 'find-as-you-type'' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Two ways to bypass Spotlight 'find-as-you-type'
Authored by: loren_ryter on Sep 11, '05 03:20:03PM

I made LaserLight an AppleScript text based QuicKeys shortcut. There seems to be no reason this should be an application rather than a normal script.

Doing so:

1. makes it unnecessary to launch another application

2. is a lot faster to start

Caveats & Mods:

A.

I hate the way Applescript is stupid about where to put user dialogs. (this could be it's own tip if it isn't already!) To put up dialogs in front of frontmost application, I always use this:


tell application (path to «constant afdregfp» as text)
  activate
       display dialog "whatever"
end tell

so for each of the display dialog commands in laser light that is not already in a tell block (ie, system preferences), I used that format.

For ease, this is the main block chaged:

if defaultToKeyword then
    tell application (path to «constant afdregfp» as text)
      activate
      display dialog "Enter text to search for:" default answer pLastSearch buttons {"Cancel", "Search", "Keyword/Name Search"} default button "Keyword/Name Search" cancel button "Cancel"
    end tell
  else
    tell application (path to «constant afdregfp» as text)
      activate
      display dialog "Enter text to search for:" default answer pLastSearch buttons {"Cancel", "Keyword/Name Search", "Search"} default button "Search" cancel button "Cancel"
    end tell
  end if

B.

QK also has an annoying problem that cancel is treated like an error. To prevent this, change the step failure setting for the step to "continue to next step"

[ Reply to This | # ]