Marius Gheorghe

Building software : make it work, make it good, make it fast

Autohotkey macros

One of the nicest and most underused features of Autohotkey is the keyboard macros. Basically the ability to define text "shortcuts" that will be expanded in a command/text etc.
Here is a example i use everyday :

::wu::
clipboard =
(
svn update c:\work\trunk\
)
send ^v
return
}


I'm defining the "wu" macro which will be expanded to "svn update c:\work\trunk" (to expand type the macro name and press TAB).
I'm using this macro to run the svn update command on my "work" project (funny side note...i noticed that updating a svn repo from CLI is at least 3-4 times faster compared to using TortoiseSVN. The power of CLI, huh ?).

Speeding Windows startup with Autohotkey

 

It's kind of painful to watch my HDD led indicator when Windows starts. Blinks like crazy trying to launch all my startup apps. And i hate it because i have no control about the order. I want Autohotkey launched first because i use hotkeys to launch other apps and i usually have to wait until pidgin, skype etc start up (skype especially, with its 17 mb exe, starts especially slow)

So i basically decied to optiomize this by only starting Autohotkey automatically and have hot key to launch all other useful startup apps. Here's how it looks :

;run at startup
#+a::
{
   if(work_computer = true)
   {
        Run c:\dropbox\utilities\mouseemu\mousemu.exe
        Run c:\Program Files\clcl\clcl.exe
        Run c:\dropbox\utilities\virtuawin\virtuawin.exe
        Run c:\Program Files (x86)\winsplit revolution\winsplit.exe
        Run c:\Program Files (x86)\pidgin\pidgin.exe
   }   
   else
   {
        Run e:\dropbox\dropbox\utilities\mouseemu\mousemu.exe
        Run c:\Program Files (x86)\clcl\clcl.exe
        Run e:\dropbox\dropbox\utilities\virtuawin\virtuawin.exe
        Run c:\Program Files (x86)\winsplit revolution\winsplit.exe
        Run c:\Program Files (x86)\pidgin\pidgin.exe
        Run c:\Program Files (x86)\utorrent\utorrent.exe
   }

   return
}

I use the work_computer var because im using this script on multiple computers and paths are different. And, yeah, i keep some portable apps in dropbox.....easiest way to keep app settings in sync.