Wednesday, October 10, 2007

AutoHotKey Script: Search Google and Wikipedia simultaneously

I found this neat little AutoHotKey script to do quick searchs on Google and Wikipedia on RaBlog



^!r::
send ^c
clipwait
run "http://www.google.com/search?hl=en&q=%clipboard%&btnG=Search"
run "http://en.wikipedia.org/wiki/Special:Search?search=%clipboard%&go=Go"
return


Quoting from the post


I do a lot of lookups in Google and Wikipedia. What this code does is copy anything I have selected, then open Wikipedia and Google with relevant search results.



  1. The first line assigns the key sctrl+alt+r (I chose “R” for ‘Research)

  2. The second instructs AutoHotKey to “Copy” by sending the copy shortcut of “Ctrl+C”

  3. The third line basically says “wait here until the copy is done”

  4. The fourth and fifth lines are a bit tricky. I went to Google and Wikipedia, ran searches, and copied their URLs. It was a simple task finding my searches embedded in the URL. Note the %clipboard% reference in each line. You can probably guess that this is the place the “copy” was stored from line 2. I just put %clipboard% in place of the search strings I found in there.

  5. The fifth line? If you have no scripting or programming background, this just says, “Done, go back to whatever you were doing”


Monday, October 1, 2007

AHK Script for Last.fm

 

Tadhg has written an Auto Hot Key script for controlling the last.fm player. 

The script can take the following commands:

  • “Toggle” to switch between playing and stopping.
  • “Skip” to skip the current track.
  • “Profile” to toggle the “My Profile” panel.
  • “Recommend” to open the recommendation dialog.
  • “Tag” to open the tag dialog.
  • “Love” to mark the current track as loved.
  • “Ban” to mark the current track as banned.
  • “IsPlaying” to mark the current track as banned.

Using AutoHotKey, I’ve assigned these keys to it:

#^NumpadMult::ControlLastFM("Toggle") ; Winkey + Control + Numpad Star to toggle
#^NumpadDiv::ControlLastFM("Skip") ; Winkey + Control + Numpad Slash to skip


Thanks for the script Tadhg!


You can find the script here.