AutoHotKey: Explorer Directory Tree: Difference between revisions

From TotalcmdWiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
<pre>
This script replaces Directory Tree box with the Windows folder tree.
;This script replaces Directory Tree box with the Windows folder tree.
;Explorer directory tree for Total Commander
;Author : Vigk


#noEnv
;Explorer directory tree for Total Commander
#singleInstance, force
;Author : Vigk
 
#noEnv
!F10::
#singleInstance, force
ifWinNotActive, ahk_class TTOTAL_CMD
!F10::
{
ifWinNotActive, ahk_class TTOTAL_CMD
send {!F10}
{
return
send {!F10}
}
return
controlGetText, cdir, TMypanel2
}
stringTrimRight, cdir, cdir, 1
controlGetText, cdir, TMypanel2
fileSelectFolder, sdir, *%cdir%, 2, Directory Tree
stringTrimRight, cdir, cdir, 1
ifEqual, sdir, , return
fileSelectFolder, sdir, *%cdir%, 2, Directory Tree
postMessage, 1075, 2912, , , ahk_class TTOTAL_CMD
ifEqual, sdir, , return
sleep 40 ; waits for the text box to be created
postMessage, 1075, 2912, , , ahk_class TTOTAL_CMD
controlSetText, TInEdit.UnicodeClass1, %sdir%, ahk_class TTOTAL_CMD
sleep 40 ; waits for the text box to be created
controlSend, TInEdit.UnicodeClass1, {Enter}, ahk_class TTOTAL_CMD
controlSetText, TInEdit.UnicodeClass1, %sdir%, ahk_class TTOTAL_CMD
return
controlSend, TInEdit.UnicodeClass1, {Enter}, ahk_class TTOTAL_CMD
</pre>
return

Revision as of 09:28, 26 December 2006

This script replaces Directory Tree box with the Windows folder tree.

;Explorer directory tree for Total Commander
;Author : Vigk
#noEnv
#singleInstance, force
!F10::
	ifWinNotActive, ahk_class TTOTAL_CMD
	{
		send {!F10}
		return
	}
	controlGetText, cdir, TMypanel2
	stringTrimRight, cdir, cdir, 1
	fileSelectFolder, sdir, *%cdir%, 2, Directory Tree
	ifEqual, sdir, , return
	postMessage, 1075, 2912, , , ahk_class TTOTAL_CMD
	sleep 40			; waits for the text box to be created
	controlSetText, TInEdit.UnicodeClass1, %sdir%, ahk_class TTOTAL_CMD
	controlSend, TInEdit.UnicodeClass1, {Enter}, ahk_class TTOTAL_CMD
return