anhnha wrote: ↑26 Jul 2024, 04:26
In the previous version, v1, Juho implemented a feature where double-clicking on a clipped window would reduce its size to a very small region. Another double-click would then restore the window to its original size.
Not sure if I found this as an extension, or I moved it there. Either way, this is from the Juho Lee's clipper script.
You can either add this directly in the Snipper script
Code: Select all
OnMessage(0x0203, WM_LBUTTONDBLCLK) ;double click to downsize. Double click again to resize.
WM_LBUTTONDBLCLK(wParam, lParam, msg, hwnd)
{
global
WinGetPos(, , &Temp_Width, &Temp_Height, "A")
If (Temp_Width = 50 && Temp_Height = 50) {
WinMove(, , hwnd_Width, hwnd_Height, "A")
} else {
hwnd_Width := Temp_Width
hwnd_Height := Temp_Height
WinMove(, , 50, 50, "A")
}
}
Or add it via extension
Code: Select all
/*--------------------------------------------------------------------------------------------------------------------
[Plugin] Shrink (by Juho-Lee [url]https://juho-lee.com[/url])
File Name : JL_Shrink.ahk
version: 1.0
topic: https://www.autohotkey.com/boards/viewtopic.php?p=506077#p506077
Help:
how to install this plugin ?
1° download FG ScreenClipper at https://www.autohotkey.com/boards/viewtopic.php?p=506077#p506077
2° put this plugin in the Lib folder of the main script
3° Note: this is a header plugin which means that it must be loaded before the plugins that contain shortcuts
insert this line "#Include JL_Shrink.ahk" in the INCLUDE SECTION of the main RUN script just after
the line that contains "#Include Fg_Context_Clip_Menu.ahk" for it to work properly
like this:
#Include gdip_all.ahk
#Include FG_Header.ahk
#Include FG_ScreenClip.ahk
#Include FG_Context_Clip_Menu.ahk
#Include JL_Shrink.ahk <------- insert the line entry here
*/
; DEFAULT SHORTCUT ---------------------------------------------------
;double click to downsize. Double click again to resize.
#Requires AutoHotkey v2
/* AHK v2 */
OnMessage(0x0203, WM_LBUTTONDBLCLK) ;double click to downsize. Double click again to resize.
WM_LBUTTONDBLCLK(wParam, lParam, msg, hwnd)
{
global
WinGetPos(, , &Temp_Width, &Temp_Height, "A")
If (Temp_Width = 50 && Temp_Height = 50) {
WinMove(, , hwnd_Width, hwnd_Height, "A")
} else {
hwnd_Width := Temp_Width
hwnd_Height := Temp_Height
WinMove(, , 50, 50, "A")
}
}