Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Mouse Edit


  • Please log in to reply
1 reply to this topic
MsgBox
  • Members
  • 204 posts
  • Last active: Jan 05 2011 01:40 AM
  • Joined: 17 Nov 2005
Hello

This is for people who like me prefers to use the mouse rather than keyboard shortcuts for editing text.
It can also be used in explorer, though use at your own risk!

;________________________
; \____Mouse Edit_____/  

;   By SlimlinE

; Hold down LButton and click RButton:-
;   Once to Copy
;   Twice to Paste
;   Three to Cut
; Hold down LButton and scroll MouseWheel:-
;   Down to Select All
;   Up to Undo
; Holding down LButton and clicking MouseWheel sends Enter
;
; Tip: Functions can be used one after another if LButton isn't released
;      ie.  Hold down LButton
;           scroll MouseWheel Down (Select All), click RButton once (Copy) etc.


; Cut Copy & Paste.

~LButton & RButton::
    If RMB_Click > 0
	    {
			RMB_Click += 1
			Return
		}
	RMB_Click = 1
    SetTimer, WaitForClicks, 800
Return

WaitForClicks:
    SetTimer, WaitForClicks, Off
    If RMB_Click = 1
        {
            Send, {LButton Up}^c
	        ClipWait,1
            String = %clipboard%

            TrayTip, ________ COPIED TO CLIPBOARD. _______, %String%
            SetTimer, RemoveTrayTip, 3000            
        }
    Else If RMB_Click = 2
        {
            Send, {LButton Up}^v
            String = %clipboard%

            TrayTip, ________ PASTED FROM CLIPBOARD. _______, %String%
            SetTimer, RemoveTrayTip, 2000            
        }
    Else If RMB_Click = 3
        {
            Send, {LButton Up}^x
            String = %clipboard%

            TrayTip, ________ CUT TO CLIPBOARD. _______, %String%
            SetTimer, RemoveTrayTip, 1000            
        }
    Else If RMB_Click > 3
        {
            Send, {LButton Up}

            TrayTip, ___ TOO MANY CLICKS! ___,Edit Aborted.
            SetTimer, RemoveTrayTip, 5000            
        }
    RMB_Click = 0
Return

RemoveTrayTip:
SetTimer, RemoveTrayTip, Off
TrayTip
Return


; Undo Enter & Select All.

~Lbutton & WheelUp::
    Send,{LButton Up}
    GetKeyState, State, WheelUp
    If State = U
        {
            Send,^z

            ToolTip, Undo
            SetTimer, RemoveToolTip, 2000
        }
Return
  
~LButton & WheelDown::
    Send,{LButton Up}
    GetKeyState, State, WheelDown
    If State = U
        {
            Send,^a
            ToolTip, Select All
            SetTimer, RemoveToolTip, 2000
        }
Return

~LButton & MButton::
    Send, {LButton Up}
    GetKeyState, State, MButton
    If, State = U
    Send, {Enter}
Return

RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
Return

;_________________________
; \____End Of Code____/


PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005
Funny, lot of people prefer to have more keyboard shortcuts than using the mouse. :-)
Well, this is interesting and creative.
Side note: thrice word exists! :-P
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")