SP+net is really a good software. I had moved to SP+net from SP+ before two years ago. And rencently, I also find a very good Autohotkey script. But it is conflicting to SP+net in some of the hotkeys.
The most important feature of the Autohotkey script (named NiftyWindows, open source) uses mouse RIGHT_BUTTON + DRAG to change the size of every window in a very fast and convinient way. After you try this function, I bet you will also love it. Since the RIGHT_BUTTON + DRAG is used by SP+net, I modify the NiftyWindows' code adding an IF to check if the LEFT _BUTTON is pressed first, so I can use hotkeys LEFT _BUTTON + RIGHT_BUTTON + DRAG (suspend SP+net first) to perform changing the size of any window. But when I enable SP+net, the function in that Autohotkey script is disable. I guess SP+net can get the hook of mouse RIGHT_BUTTON better than Autohotkey.
The introdution of NiftyWindows Autohotkey script:
http://www.enovatic.org/...s/niftywindows/features/RIGHT_BUTTON+DRAG : This is the most powerful feature of NiftyWindows. The area of every window is tiled in a virtual 9-cell grid with three columns and rows. The center cell is the largest one and you can grab and move a window around by clicking and holding it with the right mouse button. The other eight corner cells are used to resize a resizable window in the same manner with different ways.
I want to solve the problem. I suggest that when I press left mouse button, SP+net should not get the hooks of left and right buttons, and in the next half of a second when I press right mouse button and drag the mouse, the Autohotkey can get the hooks of left and right buttons to perform the function I mentioned above.
Or can anybody transfer the Autohotkey scripts of size control of windows to SP+net? Then I will use hotkey LEFT _BUTTON + RIGHT_BUTTON + DRAG (or RIGHT_BUTTON + LEFT _BUTTON + DRAG) to change every window in very convinient way. If someone may transfer the script, will SP+net let me perform the function in the script when I use RIGHT_BUTTON + LEFT _BUTTON + DRAG and SP+net will not draw any gesture?
I post the main Autohotkey script below:
$RButton::
$+RButton::
$+!RButton::
$+^RButton::
$+#RButton::
$+!^RButton::
$+!#RButton::
$+^#RButton::
$+!^#RButton::
$!RButton::
$!^RButton::
$!#RButton::
$!^#RButton::
$^RButton::
$^#RButton::
$#RButton::
GetKeyState, Peter_LButtonState, LButton, P
If ( (Peter_LButtonState = "D") and (!NWD_ImmediateDown))
{
NWD_ResizeGrids = 5
CoordMode, Mouse, Screen
MouseGetPos, NWD_MouseStartX, NWD_MouseStartY, NWD_WinID
If ( !NWD_WinID )
Return
WinGetPos, NWD_WinStartX, NWD_WinStartY, NWD_WinStartW, NWD_WinStartH, ahk_id %NWD_WinID%
WinGet, NWD_WinMinMax, MinMax, ahk_id %NWD_WinID%
WinGet, NWD_WinStyle, Style, ahk_id %NWD_WinID%
WinGetClass, NWD_WinClass, ahk_id %NWD_WinID%
GetKeyState, NWD_CtrlState, Ctrl, P
; the and'ed condition checks for popup window:
; (WS_POPUP) and !(WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME)
If ( (NWD_WinClass = "Progman") or ((NWD_CtrlState = "U") and (((NWD_WinStyle & 0x80000000) and !(NWD_WinStyle & 0x4C0000)) or (NWD_WinClass = "ExploreWClass") or (NWD_WinClass = "CabinetWClass") or (NWD_WinClass = "IEFrame") or (NWD_WinClass = "MozillaWindowClass") or (NWD_WinClass = "OpWindow") or (NWD_WinClass = "ATL:ExplorerFrame") or (NWD_WinClass = "ATL:ScrapFrame"))) )
{
NWD_ImmediateDownRequest = 1
NWD_ImmediateDown = 0
NWD_PermitClick = 1
}
Else
{
NWD_ImmediateDownRequest = 0
NWD_ImmediateDown = 0
NWD_PermitClick = 1
}
NWD_Dragging := (NWD_WinClass != "Progman") and ((NWD_CtrlState = "D") or ((NWD_WinMinMax != 1) and !NWD_ImmediateDownRequest))
; checks wheter the window has a sizing border (WS_THICKFRAME)
If ( (NWD_CtrlState = "D") or (NWD_WinStyle & 0x40000) )
{
If ( (NWD_MouseStartX >= NWD_WinStartX + NWD_WinStartW / NWD_ResizeGrids) and (NWD_MouseStartX <= NWD_WinStartX + (NWD_ResizeGrids - 1) * NWD_WinStartW / NWD_ResizeGrids) )
NWD_ResizeX = 0
Else
If ( NWD_MouseStartX > NWD_WinStartX + NWD_WinStartW / 2 )
NWD_ResizeX := 1
Else
NWD_ResizeX := -1
If ( (NWD_MouseStartY >= NWD_WinStartY + NWD_WinStartH / NWD_ResizeGrids) and (NWD_MouseStartY <= NWD_WinStartY + (NWD_ResizeGrids - 1) * NWD_WinStartH / NWD_ResizeGrids) )
NWD_ResizeY = 0
Else
If ( NWD_MouseStartY > NWD_WinStartY + NWD_WinStartH / 2 )
NWD_ResizeY := 1
Else
NWD_ResizeY := -1
}
Else
{
NWD_ResizeX = 0
NWD_ResizeY = 0
}
If ( NWD_WinStartW and NWD_WinStartH )
NWD_WinStartAR := NWD_WinStartW / NWD_WinStartH
Else
NWD_WinStartAR = 0
; TODO : this is a workaround (checks for popup window) for the activation
; bug of AutoHotkey -> can be removed as soon as the known bug is fixed
If ( !((NWD_WinStyle & 0x80000000) and !(NWD_WinStyle & 0x4C0000)) )
IfWinNotActive, ahk_id %NWD_WinID%
WinActivate, ahk_id %NWD_WinID%
; TODO : the hotkeys must be enabled in the 2nd block because the 1st block
; activates them only for the first call (historical problem of AutoHotkey)
Hotkey, Shift, NWD_IgnoreKeyHandler
Hotkey, Ctrl, NWD_IgnoreKeyHandler
Hotkey, Alt, NWD_IgnoreKeyHandler
Hotkey, LWin, NWD_IgnoreKeyHandler
Hotkey, RWin, NWD_IgnoreKeyHandler
Hotkey, Shift, On
Hotkey, Ctrl, On
Hotkey, Alt, On
Hotkey, LWin, On
Hotkey, RWin, On
SetTimer, NWD_IgnoreKeyHandler, 100
SetTimer, NWD_WindowHandler, 10
}
Else
{
; this feature should be implemented by using a timer because
; AutoHotkeys threading blocks the first thread if another
; one is started (until the 2nd is stopped)
Thread, priority, 1
MouseClick, RIGHT, , , , , D
KeyWait, RButton
MouseClick, RIGHT, , , , , U
}
Return