Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* CAPSLOCK WINDOWS SWITCHER
- * Notice that this will let your left mouse can not drag.
- * Do it by hold the alt button down then click once to start, click twice to stop dragging
- * Or delete the LButton function but live with your own lack of full function
- */
- ; initial variables
- lastwin := ""
- ; Hold mouse | Free hand Click and Drag
- ; https://autohotkey.com/board/topic/95066-minecraft-hold-left-mouse-button/
- !LButton:: Send % "{Click " . ( GetKeyState("LButton") ? "Up}" : "Down}" )
- $LButton::
- ; for WINDOWS SWITCHER FUNCTION
- CoordMode, Mouse, Screen
- MouseGetPos, x, y
- if (x > 40 && x < A_ScreenWidth / 2 + 200 && y > A_ScreenHeight - 40) {
- ; click on the programs on the taskbar area (height: 40px)
- WinGetTitle, lastwin, a
- Sleep 10
- }
- send {Lbutton}
- return
- CapsLock::
- if (lastwin) {
- WinGetTitle, thiswin, a
- Sleep 100
- if (thiswin == lastwin) {
- send !{esc}
- }
- else {
- ; TrayTip, ,%lastwin%
- WinGetTitle, thiswin, a
- Sleep 10
- WinActivate, %lastwin%
- lastwin := thiswin
- }
- } else {
- WinGetTitle, lastwin, a
- send !{esc}
- }
- return
Advertisement
Add Comment
Please, Sign In to add comment