Non-modal File Search box

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
maonus
Junior Member
Junior Member
Posts: 2
Joined: 2010-12-30, 10:11 UTC

Non-modal File Search box

Post 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.
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post 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.
maonus
Junior Member
Junior Member
Posts: 2
Joined: 2010-12-30, 10:11 UTC

Post by *maonus »

Great, thanks!
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

User avatar
hoppfrosch
Junior Member
Junior Member
Posts: 67
Joined: 2004-10-20, 05:39 UTC

Post by *hoppfrosch »

Crossposting - moved to dedicated topic: http://ghisler.ch/board/viewtopic.php?p=235223#235223
Post Reply