Skip to content

Instantly share code, notes, and snippets.

@Rplus
Last active November 19, 2018 14:10
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Rplus/6147549 to your computer and use it in GitHub Desktop.
Save Rplus/6147549 to your computer and use it in GitHub Desktop.
my personal autohotkey script
; new mouse: microsoft comfort 6000,
; custom side-button behavior by autohotkey,
; => helpful for browser webpage (FB/blog/news)
XButton1::Send {PgDn}
XButton2::Send {PgUp}
~LButton & XButton2::Send {Home}
~LButton & XButton1::Send {End}
; ref: http://www.howtogeek.com/howto/28663/create-a-hotkey-to-resize-windows-to-a-specific-size-with-autohotkey/
;----------------------------------------------------------------
; AutoHotkey Version: 1.x
; Language: English
; Author: Lowell Heddings <geek@howtogeek.com>
; Description: Resize Active Window
;
;----------------------------------------------------------------
; EXAMPLES
;----------------------------------------------------------------
; Note: all examples using Alt+Win+U as the hotkey
;
; #!u::ResizeWin(800,600)
; - Resize a window to 800 width by 600 height
;
; #!u::ResizeWin(640)
; - Resize a window to 640 width, leaving the height the same
;
; #!u::ResizeWin(0,600)
; - Resize a window to 600 height, leaving width the same
;
;----------------------------------------------------------------
#NoEnv
ResizeWin(Width = 0, Height = 0, Direction = 1 )
{
WinGetPos,X,Y,W,H,A
If %Width% = 0
Width := W + Direction * 100
If %Height% = 0
Height := H
WinMove,A,,%X%,%Y%,%Width%,%Height%
}
#Left::ResizeWin(,,-1)
#Right::ResizeWin()
@Rplus
Copy link
Author

Rplus commented Aug 3, 2013

~LButton: {LButton} keyup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment