Sunday, September 16, 2012

Hotkeys

This 1 is exactly for Windows users.

If you lot haven't heard of the application "Autohotkey" mightiness I propose you lot get got a look. It enables you lot to practise complex scripts to automate repetitive tasks.

Installation is quite simple, exactly download too live on the installer.

Once you lot get got it upwardly too running only correct click on the ikon inward the taskbar, too pick out "Edit this script". The default script exclusively has 1 shortcut:

^!n::
IfWinExist Untitled - Notepad
WinActivate
else
Run Notepad
return


Let's get got a await at what it does:
First it defines the hotkey, inward this case:
^ - ctrl
! - alt
n - n

When the hotkey (ctrl+alt+n) is pressed:
IfWinExist Untitled - Notepad - Checks if notepad is running
WinActivate - If truthful it brings it to the foreground too puts focus on it
else
 Run Notepad 
- self explanitory (though if you lot purpose an application non reference inward the organisation %path% varable you lot get got to laissez passer the sum path)
return
- halt of hotkey

equally a farther example, this is the shortcut I purpose to ping the address currently inward the organisation clipboard

^!p::
address=%clipboard%
run, ping %address% -t
return

If you lot get got whatsoever other cool ideas on using hotkeys, allow me know.