I would like to hit cmd+X to switch to (or launch, if it's not running) the #X application in the Dock, without hardconding that application.
I.e. if my third application in the dock is the Terminal, I hit cmd+3 and I switch to the terminal, but if I then move Adium to that position, cmd+3 automatically opens Adium.
Can this be done on OSX 10.8 (or 10.9)?
Even better, though that's not required, if in case I hit the combination of the already active application, it hides it instead.