Skip to content

Instantly share code, notes, and snippets.

@Osse
Created July 4, 2012 21:33
Show Gist options
  • Save Osse/3049654 to your computer and use it in GitHub Desktop.
Save Osse/3049654 to your computer and use it in GitHub Desktop.
Autohotkey stuff
; IMPORTANT INFO ABOUT GETTING STARTED: Lines that start with a
; semicolon, such as this one, are comments. They are not executed.
; This script has a special filename and path because it is automatically
; launched when you run the program directly. Also, any text file whose
; name ends in .ahk is associated with the program, which means that it
; can be launched simply by double-clicking it. You can have as many .ahk
; files as you want, located in any folder. You can also run more than
; one .ahk file simultaneously and each will get its own tray icon.
; SAMPLE HOTKEYS: Below are two sample hotkeys. The first is Win+Z and it
; launches a web site in the default browser. The second is Control+Alt+N
; and it launches a new Notepad window (or activates an existing one). To
; try out these hotkeys, run AutoHotkey again, which will load this file.
#z::Run www.autohotkey.com
SEtTitleMatchMode 2
^!f::
If WinExist("ahk_class MozillaWindowClass")
WinActivate
else
Run firefoX
return
^!n::
if WinExist("ahk_class vim")
WinActivate
else
Run gViM
return
; Note: From now on whenever you run AutoHotkey directly, this script
; will be loaded. So feel free to customize it to suit your needs.
; Please read the QUICK-START TUTORIAL near the top of the help file.
; It explains how to perform common automation tasks such as sending
; keystrokes and mouse clicks. It also explains more about hotkeys.
<^>!q::Send {~}{Space}
<^>!w::Send {Up}
<^>!a::Send {Left}
<^>!s::Send {Down}
<^>!d::Send {Right}
<^>!r::{
<^>!t::}
<^>!f::[
<^>!g::]
#IfWinNotActive ahk_class TaskSwitcherWnd
!Space::Send {Media_Play_Pause}
!Left::Send {Media_Prev}
!Right::Send {Media_Next}
!Up::Send {Volume_Up}
!Down::Send {Volume_Down}
#IfWinNotActive
^!r::Reload
^!e::Edit
!q::
IfWinExist Red Hat Enterprise Linux 5 - VMware Workstation
WinGet MMX, MinMax
IfEqual MMX,-1, WinRestore
WinActivate
MouseMove, 200, 200, 0
; IfEqual MMX,-1, MouseClick
; MouseClick
return
^!q::WinMinimize, Red Hat Enterprise Linux 5 - VMware Workstation
#If NOT(WinActive("ahk_class Vim") or WinActive("ahk_class PuTTY"))
^w::Send ^{Backspace}
^u::Send {Shift Down}{Home}{Shift Up}{Delete}
#If WinActive("ahk_class Vim") or WinActive("ahk_class PuTTY")
LControl::Send {Escape}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment