OSX Maximize Window Hotkey [w/ QuickSilver]

Posted May 22nd, 2011 in Uncategorized by Justin

Credit: macworld.com

  1. Open Apple Script Editor and paste this:
  2. tell application "System Events"
      if UI elements enabled then
        set FrontApplication to (get name of every process whose frontmost is true) as string
        tell process FrontApplication
          click button 2 of window 1
          --button 2 is the green "zoom" button for all applications
          --window 1 is always the frontmost window.
        end tell
      else
        tell application "System Preferences"
          activate
          set current pane to pane "com.apple.preference.universalaccess"
          display dialog "UI element scripting is not enabled. Check 'Enable access for assistive devices'"
        end tell
      end if
    end tell
  3. Set this as a trigger in QuickSilver. I chose CMD+OPT+m

USB device won’t work after waking from sleep

Posted September 19th, 2010 in Uncategorized by Justin

I have a USB IR Receiver that I use to control Windows Media Center as well as volume for any other program playing music.  However, I always had the problem where the IR receiver would not work properly after resuming from sleep (even though the remote is the device that woke it up in the first place!).  I’ve struggled with this problem forever and recently found a fix.

One fix that has always worked for me was physically disconnecting and reconnecting the IR receiver from a USB slot. But the whole purpose of having a remote is so you don’t have to be right next to the computer.  Below is a way to automate this disconnect/reconnect process with software.

  1. Download Sleep/Resume Triggers below.  We will use this to automatically run a script right before the computer is suspended (goes to sleep).
    Windows Suspend/Resume Control (Power Triggers) Download Link #1 

  2. Download devcon from the link below.  This will allow you create a script that disconnects and reconnects the USB device properly.
    Devcon download link #1
  3. Hit the windows key and type “device”.  Choose “Device Manager” from the application list.
  4. Expand the “Universal Serial Bus controllers” item and find the USB device that has the problem.  Note the ID that appears between the parentheses at the end of the name:
  5. Right click and choose edit on the suspend.bat file in the installation directory (C:\Program Files\Derek Smith\Power Triggers). Replace the contents of the file with the text below, substituting USBCIR with the ID you found in step 4:
    devcon remove *USBCIR*
  6. Save the file and open PowerTriggers.exe.   Double click the Power Triggers icon in your system tray and choose the suspend.bat file for the Suspend action.