AutoHotkey
From Attie's Wiki
(Difference between revisions)
m |
m (→Make Ctrl+L select the address bar like every other browser) |
||
Line 17: | Line 17: | ||
[http://superuser.com/questions/548383/focus-in-windows-address-bar-using-ctrl Source] | [http://superuser.com/questions/548383/focus-in-windows-address-bar-using-ctrl Source] | ||
* Fixes a stupid decision that Microsoft made (try Alt+D) | * Fixes a stupid decision that Microsoft made (try Alt+D) | ||
+ | |||
+ | ===Make Ctrl+W close Win8+ App Windows=== | ||
+ | <source lang="text"> | ||
+ | #IfWinActive, ahk_class ApplicationFrameWindow | ||
+ | ^W:: | ||
+ | Send !{f4} | ||
+ | return | ||
+ | #IfWinActive | ||
+ | </source> | ||
===Source=== | ===Source=== |
Revision as of 16:07, 28 January 2016
This tool is fabulous. Get it from here: http://www.autohotkey.com/
Contents |
Attie's AHK Script
The following script is a combination of a couple of scripts I've seen: "kdestyle" and "Make Backspace in Windows 7 or Vista Explorer Go Up like XP Did".
kdestyle
- To move a window, press and hold the windows button, and then Left Click and drag.
- To resize a window, press and hold the windows button, and then Right Clock and drag - resizes from the closest corner.
- I changed it slightly, because they used the wrong hotkeys and added silly functions
:)
Make Backspace in Windows 7 or Vista Explorer Go Up like XP Did
- Fixes a stupid mistake that Microsoft made
Make Ctrl+L select the address bar like every other browser
- Fixes a stupid decision that Microsoft made (try Alt+D)
Make Ctrl+W close Win8+ App Windows
#IfWinActive, ahk_class ApplicationFrameWindow ^W:: Send !{f4} return #IfWinActive
Source
#NoTrayIcon #SingleInstance force if (A_AhkVersion < "1.0.39.00") { MsgBox,20,,This script may not work properly with your version of AutoHotkey. Continue? IfMsgBox,No ExitApp } SetWinDelay,2 CoordMode,Mouse return #LButton:: MouseGetPos,KDE_X1,KDE_Y1,KDE_id WinGet,KDE_Win,MinMax,ahk_id %KDE_id% if KDE_Win return WinGetPos,KDE_WinX1,KDE_WinY1,,,ahk_id %KDE_id% loop { GetKeyState,KDE_Button,LButton,P if KDE_Button = U break MouseGetPos,KDE_X2,KDE_Y2 KDE_X2 -= KDE_X1 KDE_Y2 -= KDE_Y1 KDE_WinX2 := (KDE_WinX1 + KDE_X2) KDE_WinY2 := (KDE_WinY1 + KDE_Y2) WinMove,ahk_id %KDE_id%,,%KDE_WinX2%,%KDE_WinY2% } return #RButton:: MouseGetPos,KDE_X1,KDE_Y1,KDE_id WinGet,KDE_Win,MinMax,ahk_id %KDE_id% if KDE_Win return WinGetPos,KDE_WinX1,KDE_WinY1,KDE_WinW,KDE_WinH,ahk_id %KDE_id% if (KDE_X1 < KDE_WinX1 + KDE_WinW / 2) { KDE_WinLeft := 1 } else { KDE_WinLeft := -1 } if (KDE_Y1 < KDE_WinY1 + KDE_WinH / 2) { KDE_WinUp := 1 } else { KDE_WinUp := -1 } loop { GetKeyState,KDE_Button,RButton,P if KDE_Button = U break MouseGetPos,KDE_X2,KDE_Y2 WinGetPos,KDE_WinX1,KDE_WinY1,KDE_WinW,KDE_WinH,ahk_id %KDE_id% KDE_X2 -= KDE_X1 KDE_Y2 -= KDE_Y1 WinMove,ahk_id %KDE_id%,, KDE_WinX1 + (KDE_WinLeft+1)/2*KDE_X2 , KDE_WinY1 + (KDE_WinUp+1)/2*KDE_Y2 , KDE_WinW - KDE_WinLeft *KDE_X2 , KDE_WinH - KDE_WinUp *KDE_Y2 KDE_X1 := (KDE_X2 + KDE_X1) KDE_Y1 := (KDE_Y2 + KDE_Y1) } return #IfWinActive, ahk_class CabinetWClass Backspace:: ControlGet renamestatus,Visible,,Edit1,A ControlGetFocus focussed, A if (renamestatus != 1 && (focussed = "DirectUIHWND3" || focussed = SysTreeView321)) { SendInput {Alt Down}{Up}{Alt Up} } else { Send {Backspace} } return ^L:: Send !D return #IfWinActive