William Bartholomew

Musings on software engineering, technology and Aspergers Syndrome.

Making Ubiquity Ubiquitous

with 7 comments

I recently read an post about Mozilla Ubiquity on Lifehacker and it’s an impressive add-in for Mozilla Firefox. One of the biggest limitations I see is that its keyboard shortcut is only available from within Firefox; I really want to be able to invoke it from whatever application I’m currently using.

With a few lines in an AutoHotkey script this was easily achieved. This script is executed whenever you press Windows Key+Space and switches to Firefox (or launches it if it isn’t running) and then sends the Ubiquity keyboard shortcut (Ctrl+Space) to that Firefox instance.

; Make ubiquity ubiquitous
#space::
  FirefoxTitle = Mozilla Firefox
  FirefoxPath = %programfiles%\Mozilla Firefox\firefox.exe
  SetTitleMatchMode, 2
  IfWinNotExist, %FirefoxTitle%
  {
    Run %FirefoxPath%
  }
  WinActivate, %FirefoxTitle%
  WinWaitActive, %FirefoxTitle%
  Send, ^{Space}
  return

Written by wbarthol

October 5, 2008 at 12:22 pm

Posted in utility

7 Responses

Subscribe to comments with RSS.

  1. Nice!

    Abi

    October 7, 2008 at 4:25 pm

  2. the video is awesome. now what about making ubiquity a stand-alone product so one doesn’t need to run firefox for it?

    zypsilon

    October 9, 2008 at 7:48 pm

  3. [...] Making Ubiquity Ubiquitous [ William Bartholomew ] Сохранить заметку: Автор: rushills Рубрики: Клавиатурные сочетания, Браузеры, Советы по Windows, Бесплатное ПО [...]

  4. Now, solve the general problem: Make all applications expose their functionality and talk to each other. Go forth!

    Alberto Fiduccio

    October 12, 2008 at 8:59 pm

  5. Hi
    Thanks for the tip!
    But I have an issue when my Firefox window is iconized in the system tray. Pressing the global hotkey will just launch a new window of Firefox, instead of reopening the iconized one.
    Is there a way to solve that?
    Thanks

    Klint

    May 12, 2009 at 5:36 pm

  6. I have found a way by updating the script slightly :

    #space:: ; Change shortcut if needed
    FirefoxTitle = Mozilla Firefox
    FirefoxPath = %programfiles%\Mozilla Firefox\firefox.exe
    SetTitleMatchMode, 2
    DetectHiddenWindows, on
    IfWinNotExist, %FirefoxTitle%
    {
    Run %FirefoxPath%
    }
    WinShow, %FirefoxTitle%
    WinActivate, %FirefoxTitle%
    WinWaitActive, %FirefoxTitle%
    Send, ^{Space} ; Change shortcut if needed
    return

    Klint

    May 12, 2009 at 5:50 pm

  7. Thanks, this was awesomely useful, and exactly what I was looking for.

    mo

    July 3, 2009 at 6:12 am


Leave a Reply