hello
this is Titan's script that creates new folder on double click:
Code:
#IfWinActive ahk_class CabinetWClass ; the ahk_class of explorer windows
; hotkeys here will only work when explorer windows are active
~LButton:: ; the left mouse button
SetKeyDelay, , 50 ; seems to be needed for SendEvent to work
MouseGetPos, , , , ctrl ; get the control under the mouse cursor
ControlGet, sel, List, Count Selected, SysListView321, A ; get the number of items selected
If DllCall("GetDoubleClickTime") > A_TimeSincePriorHotkey ; if: this is a double-click,
and A_ThisHotkey = A_PriorHotkey ; the last hotkey pressed is the same as this one,
and ctrl = "SysListView321" ; the control under the mouse cursor is the ListView,
and sel = 0 ; and no items (files or folders) are selected then...
SendEvent, !fwf ; Send Alt+F > N > F (File > New > Folder) - WinMenuSelectItem doesn't work for me
Return
#IfWinActive
the problem is that it creates new folder when you double click on the title bar of the window of a folder
specificaly, it creates it when you double click there to maximize the window and NOT when you click there to minimize the window
you may wonder why this happens... well it is because when you double click there to maximize the window, just afterwards the cursor is inside the 'listview' and thus it triggers new folder creation
on the other hand, when you double click there to minimize the window, the cursor, just afterwards, is NOT inside the listview, thus it doesn't trigger new folder creation
so what I consider to do is, either to limit the script to work when I double click on 'white' area (as well as when I click in listview area), since the title bar is blue
or there would be a better way?
thanks