Extensions
: K-Meleon Forum
All about K-Meleon extensions.
Goto:
Forum List
•
Message List
•
Search
•
Log In
Your Name:
Subject:
Help information
BBcode help
Smileys help
[quote=disrupted] hi alex download this: [url=http://kmext.sourceforge.net/files/autoclipcopy.7z]http://kmext.sourceforge.net/files/autoclipcopy.7z[/url] special thanks to pwy@ ahk forums for the original source [url=http://www.autohotkey.com/forum/topic5439.html]http://www.autohotkey.com/forum/topic5439.html[/url] [color=#000088][sub] # K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # ---------auto copy selected text------- $_tool_path=getfolder(RootFolder)."\\Tools"; autoclipcopy{ exec($_tool_path."\\autoclipcopy\\autoclipcopy.exe start"); } autoclipexit{ exec($_tool_path."\\autoclipcopy\\autoclipcopy.exe "); } # -------------------------------------------- $OnInit=$OnInit."autoclipcopy;"; $OnQuit=$OnQuit."autoclipexit;"; $macroModules=$macroModules."autoclipcopy;";[/sub][/color] [color=#656B4E][sub];Auto copy clipboard ;thanks to pwy from autoitforums ; slightly modified for km by disrupted ;original code can be found there:http://www.autohotkey.com/forum/topic5439.html #notrayicon #SingleInstance force if 0 < 1 ; The left side of a non-expression if-statement is always the name of a variable. { ExitApp } ~Lshift:: TimeButtonDown = %A_TickCount% ; Wait for it to be released Loop { Sleep 10 GetKeyState, LshiftState, Lshift, P if LshiftState = U ; Button has been released. break elapsed = %A_TickCount% elapsed -= %TimeButtonDown% if elapsed > 200 ; Button was held down long enough { x0 = A_CaretX y0 = A_CaretY Loop { Sleep 20 ; yield time to others GetKeyState keystate, Lshift IfEqual keystate, U, { x0 = A_CaretX y0 = A_CaretY break } } if (x-x0 > 5 or x-x0 < -5 or y-y0 > 5 or y-y0 < -5) { ; Caret has moved clip0 := ClipBoardAll ; save old clipboard ;ClipBoard = Send ^c ; selection -> clipboard ClipWait 1, 1 ; restore clipboard if no data IfEqual ClipBoard,, SetEnv ClipBoard, %clip0% } return } } ~LButton:: TimeButtonDown = %A_TickCount% ; Wait for it to be released Loop { Sleep 10 GetKeyState, LButtonState, LButton, P if LButtonState = U ; Button has been released. break elapsed = %A_TickCount% elapsed -= %TimeButtonDown% if elapsed > 200 ; Button was held down too long, so assume it's not a double-click. { MouseGetPos x0, y0 ; save start mouse position Loop { Sleep 20 ; yield time to others GetKeyState keystate, LButton IfEqual keystate, U, { MouseGetPos x, y ; position when button released break } } if (x-x0 > 5 or x-x0 < -5 or y-y0 > 5 or y-y0 < -5) { ; mouse has moved clip0 := ClipBoardAll ; save old clipboard ;ClipBoard = Send ^c ; selection -> clipboard ClipWait 1, 1 ; restore clipboard if no data IfEqual ClipBoard,, SetEnv ClipBoard, %clip0% } return } } ; Otherwise, button was released quickly enough. Wait to see if it's a double-click: TimeButtonUp = %A_TickCount% Loop { Sleep 10 GetKeyState, LButtonState, LButton, P if LButtonState = D ; Button has been pressed down again. break elapsed = %A_TickCount% elapsed -= %TimeButtonUp% if elapsed > 350 ; No click has occurred within the allowed time, so assume it's not a double-click. { ;MouseClick, Left return } } ; Since above didn't return, it's a double-click: Sleep, 100 Send, ^c return[/sub][/color][/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development