Page 1 of 1

Non-modal File Search box

Posted: 2010-12-30, 10:19 UTC
by maonus
Hi,
Is it possible to make the File Search box non-modal (work in background)? Now, when there's a long search running, it's blocking the option to continue working with TC.

Posted: 2010-12-30, 13:59 UTC
by Balderstrom
All of TC's Dialogs are Modal. Whether or not it is really necessary, I'm not sure. Yet the modal find files dialog is possibly the most bothersome.
AutoHotkey script wrote:Alt+F7:: Makes the find dialog non-modal, AND
If a Find Dialog exists, and is active, Alt+F7 minimizes it.
If a Find dialog exists, and is minimized, Alt+F7 restores it.
Personally I would change it to "$^f" (Ctrl+F) as that is what I have as a shortcut for Find files. As opposed to TC's default FTP Connect for Ctrl+F.

Code: Select all

	#SingleInstance, Force 
	#Persistent
	#NoEnv
SetBatchLInes, -1
SendMode Input

GroupAdd, TCWinFF, ahk_class TTOTAL_CMD
GroupAdd, TCWinFF, ahk_class TFindFile

#ifWinActive, ahk_group TCWinFF
	$!F7::TCFindFiles(WinActive("ahk_class TTOTAL_CMD"))
return

TCFindFiles( tcWin )
{
	if( tcWin && !(ffWin:=WinExist("ahk_class TFindFile")))
		PostMessage, 0x433, 501, 0,, A
	else
	if( !tcWin ) 
	{
		tcWin:=DllCall("GetWindow", "uint", ffWin:=WinExist("A"),"int",4)	; GW_OWNER
		WinGetClass, aClass, ahk_id %tcWin%
		if( aClass == "TTOTAL_CMD" )
			WinMinimize, ahk_id %ffWin%
	}
	else
	{	;; TOTAL COMMANDER is active, and a TFindFile exists.
		ownerID:=DllCall("GetWindow", "uint", ffWin,"int",4)	; GW_OWNER
		if( ownerID == tcWin )
		{
			WinRestore,  ahk_id %ffWin%
			WinActivate, ahk_id %ffWin%
		}
		else
			PostMessage, 0x433, 501, 0,, A
	}
	WinSet, Enable,, ahk_id %tcWin%
return
}
Edit: Fix for multiple instances of TC -- make sure instance of TC is the owner of the Find Dialog.

Posted: 2010-12-31, 12:38 UTC
by maonus
Great, thanks!

Posted: 2011-11-21, 22:01 UTC
by Balderstrom

Posted: 2011-11-22, 06:48 UTC
by hoppfrosch
Crossposting - moved to dedicated topic: http://ghisler.ch/board/viewtopic.php?p=235223#235223