[Feature Request] change focus to panel on mouse over
Moderators: Hacker, petermad, Stefan2, white
[Feature Request] change focus to panel on mouse over
Can you add feauture to change focus to left or right panel when i move mouse over it?
- XPEHOPE3KA
- Power Member
- Posts: 854
- Joined: 2006-03-03, 18:23 UTC
- Location: Saint-Petersburg, Russia
I didn't try it myself, but perhaps one of these mouse tools like "XMouse" will do the trick? If not, an AHK- or AutoIT-Script might help. Here is a solution with AutoIT:
If you don't have AutoIT installed, you can try a compiled version of this script. You can download it from here:
TCFocusPanelOnMouseOver
Code: Select all
;====================================================================================================
;TCFocusPanelOnMouseOver.au3, van Dusen, 2006-05-17
;Script for AutoIT3 (http://www.autoitscript.com/autoit3/)
;====================================================================================================
AutoItSetOption("WinTitleMatchMode", 4)
AutoItSetOption("MouseCoordMode", 2)
$classTC = "classname=TTOTAL_CMD"
$intCurrActivePanel = 0
$intLastActivePanel = 0
While 1
WinWaitActive($classTC)
$hwndTC = WinGetHandle($classTC)
$arrTMyListBox1Pos = ControlGetPos($classTC, "", "TMyListBox1")
$arrTMyListBox2Pos = ControlGetPos($classTC, "", "TMyListBox2")
$arrMousePos = MouseGetPos()
If $arrMousePos[0] >= $arrTMyListBox1Pos[0] _
And $arrMousePos[0] <= $arrTMyListBox1Pos[0] + $arrTMyListBox1Pos[2] _
And $arrMousePos[1] >= $arrTMyListBox1Pos[1] _
And $arrMousePos[1] <= $arrTMyListBox1Pos[1] + $arrTMyListBox1Pos[3] Then
;*** cm_FocusRight=4002;Focus on right file list
$intCurrActivePanel = 4002
ElseIf $arrMousePos[0] >= $arrTMyListBox2Pos[0] _
And $arrMousePos[0] <= $arrTMyListBox2Pos[0] + $arrTMyListBox2Pos[2] _
And $arrMousePos[1] >= $arrTMyListBox2Pos[1] _
And $arrMousePos[1] <= $arrTMyListBox2Pos[1] + $arrTMyListBox2Pos[3] Then
;*** cm_FocusLeft=4001;Focus on left file list
$intCurrActivePanel = 4001
EndIf
If $intCurrActivePanel <> $intLastActivePanel Then
DllCall("user32.dll", "int", "SendMessage", "hwnd", $hwndTC, "int", 1075, "int", $intCurrActivePanel)
$intLastActivePanel = $intCurrActivePanel
EndIf
Sleep(250)
WEnd
If you don't have AutoIT installed, you can try a compiled version of this script. You can download it from here:
TCFocusPanelOnMouseOver
This is an AHK script with active drag&drop, please try and report:
Edit: fixed problems reported by gbo and StickyNomad.
Icfu
Code: Select all
RegRead, DoubleClickSpeed, HKEY_CURRENT_USER, Control Panel\Mouse, DoubleClickSpeed
If NOT DoubleClickSpeed
DoubleClickSpeed = 500
SetTimer, FocusCheck, 10 ;adjust responsiveness in milliseconds
Return
FocusCheck:
WinWaitActive, ahk_class TTOTAL_CMD
ControlGetFocus, Focus
MouseGetPos, null, null, null, HoveredControl
If (InStr(HoveredControl, "TMyListBox") AND NOT (Focus="TMyPanel5" OR Focus="TMyPanel9" OR Focus="TInEdit.UnicodeClass1" OR GetKeyState("LButton", "P") OR GetKeyState("RButton", "P")))
ControlFocus, %HoveredControl%
Return
#IfWinActive, ahk_class TTOTAL_CMD
~LButton::
Thread, NoTimers
Sleep, %DoubleClickSpeed%
Thread, NoTimers, false
Return
Icfu
Last edited by icfu on 2006-05-18, 20:12 UTC, edited 4 times in total.
This account is for sale
So far, so good, AHK for ever!
Thanks
Double click is not always working as expected on my PC. Sometimes it needs more than dbl click especially when switched from one panel to the other and when clicking on [..] (go to parent folder)

Thanks
Double click is not always working as expected on my PC. Sometimes it needs more than dbl click especially when switched from one panel to the other and when clicking on [..] (go to parent folder)
Gil
Licence #17346
90% of coding is debugging. The other 10% is writing bugs.
Licence #17346
90% of coding is debugging. The other 10% is writing bugs.
Recheck error corrected version above, should work perfectly or at least better now.Double click is not always working as expected on my PC. Sometimes it needs more than dbl click especially when switched from one panel to the other and when clicking on [..] (go to parent folder)

Icfu
This account is for sale
- StickyNomad
- Power Member
- Posts: 1933
- Joined: 2004-01-10, 00:15 UTC
- Location: Germany
2icfu

When slowly moving the mouse from one panel straight up to e.g. the buttonbar, the focus isn't updated correctly anymore when hovering back again over the panels. After clicking somewhere in a panel, everything behaves normal again.
This Could also be Mousedriver- or whatever-related and is no fixing request, just a hint
Good work! Well, after a quick test it seems the latter one is trueshould work perfectly or at least better now.

When slowly moving the mouse from one panel straight up to e.g. the buttonbar, the focus isn't updated correctly anymore when hovering back again over the panels. After clicking somewhere in a panel, everything behaves normal again.
This Could also be Mousedriver- or whatever-related and is no fixing request, just a hint

- StickyNomad
- Power Member
- Posts: 1933
- Joined: 2004-01-10, 00:15 UTC
- Location: Germany
Please do the following check, the script seems to have a problem I have already reported in the AHK forum:
1. Start inline renaming an arbitrary file
2. While renaming hover the rename box.
Do you get an error popup?
1. Start inline renaming an arbitrary file
2. While renaming hover the rename box.
Do you get an error popup?
IcfuError: This variable or function name contains an illegal character. The current thread will exit.
Specifically: TInEdit.UnicodeClass1
blabla...
This account is for sale
- StickyNomad
- Power Member
- Posts: 1933
- Joined: 2004-01-10, 00:15 UTC
- Location: Germany
- StickyNomad
- Power Member
- Posts: 1933
- Joined: 2004-01-10, 00:15 UTC
- Location: Germany