AutoHotkey: Reset the MultiRenameTool automatically: Difference between revisions

From TotalcmdWiki
Jump to navigation Jump to search
(solution2 corrected)
(Corrected solution 2.)
Line 16: Line 16:


== Solution 2 ==
== Solution 2 ==
  ; If the MRT-WIndow is opened it is sufficient to press [Alt]+[Backspace] to  
  ; If the MRT-WIndow is opened it is sufficient to press [Alt]+[Backspace] to
  ; load the default settings.  
  ; load the default settings.
  ~!BS::
  ~!BS::
  ifWinActive ( "ahk_class TMultiRename" )
if WinActive( "ahk_class TMultiRename" )
  {
{
  Send {F2}{Home}{Down}{Enter}
  Send {F2}{Home}{Down}{Enter}
WinWaitClose
  }
  }
  Return
  Return

Revision as of 11:07, 8 March 2006

When you open the Multi Rename Tool usually the last used values of the current session are restored. That may be not desired. To prevent this here two solutions:

Solution 1

;This script will wait for the Multirename Tool to appear, and reset the data automatically.

 #Persistent
 
 loop
 {
 	WinWait ahk_class TMultiRename
 	Send {F2}{Home}{Down}{Enter}
 	WinWaitClose
 }


Solution 2

; If the MRT-WIndow is opened it is sufficient to press [Alt]+[Backspace] to
; load the default settings.
~!BS::
if WinActive( "ahk_class TMultiRename" )
{
	Send {F2}{Home}{Down}{Enter}
}
Return





Back to AutoHotkey