#NoEnv #Persistent #SingleInstance force SetBatchLines, -1 SendMode, Input SetControlDelay, 0 $F2::GoSub,EditNameOnly2 EditNameOnly2: Hotkey,$F2,Off Ext= CheckCurrent:= CurrentControl filenameApp:= filename filenameApp2:= filename2 WinGetClass, active_class, A ControlGet, filename3, List, Focused Col1, SysListView321, ahk_class WorkerW ControlGet, filename2, List, Focused Col1, SysListView321, ahk_class Progman ControlGet, filename, List, Focused Col1, SysListView321, ahk_class CabinetWClass ControlGetFocus, CurrentControl,,FolderView SplitPath, filename,,, Ext, FileNameNoExt if (active_class="QWidget") { Send {F2} CurrentControl="QWidget" } if (active_class="WorkerW") { SplitPath, filename3,,, Ext2, FileNameNoExt } if (active_class="Progman") { SplitPath, filename2,,, Ext2, FileNameNoExt } if ((CheckCurrent <> CurrentControl or filenameApp<>filename or filenameApp2<>filename2) and (CurrentControl="SysListView321" or CurrentControl="") ) { ENOStatus= } If ((CurrentControl="SysListView321" or CurrentControl="Edit2" or CurrentControl="" or CurrentControl="Edit1")) { if (active_class="Progman" or active_class="WorkerW") { Ext:=Ext2 } if (StrLen(Ext)>0) { if (ENOStatus<>"ENO") { pos := StrLen(Ext) + 1 Send {F2}{Shift Down}{Left %pos%}{Shift Up} ENOStatus= ENO } Else { ;MsgBox 2 pos := StrLen(Ext) + 1 Send {Shift Down}{Right %pos%}{Shift Up} ENOStatus= } } else { Send {F2} ENOStatus= } } Else { Send {F2} ENOStatus= } Hotkey,$F2,On Return