         }
     }
 return
-
-; 新建文件菜单
-ReadNewFile()
-{
-    NewFiles[0] := 0
-    SetBatchLines -1
-    Loop, HKEY_CLASSES_ROOT , , 1, 0
-    {
-        if A_LoopRegName=.lnk ;让新建快捷方式无效
-            continue
-        else if RegExMatch(A_LoopRegName, "^\..*")
-        {
-            Reg := A_LoopRegName
-            Loop, HKEY_CLASSES_ROOT, %Reg%, 1, 1
-            {
-                if RegExMatch(A_LoopRegName, "i)shellnew")
-                {
-                    NewReg := A_LoopRegSubKey "\shellnew"
-                    if RegGetNewFilePath(NewReg)
-                    {
-                        NewFiles[0]++
-                        Index := NewFiles[0]
-                        NewFiles[Index] := RegGetNewFileDescribe(Reg) . "(" . Reg . ")[" . RegGetNewFilePath(NewReg) . "]"
-                    }
-                }
-            }
-        }
-    }
-    LoopCount := NewFiles[0]
-    Half := LoopCount/2
-    Loop % LoopCount
-    {
-        if A_Index < %Half%
-        {
-            B_Index := NewFiles[0] - A_Index + 1
-            C_Index := NewFiles[A_Index]
-            NewFiles[A_Index] := NewFiles[B_Index]
-            NewFiles[B_Index] := C_Index
-        }
-    }
-    Menu, TC_CreateNewFile, UseErrorLevel, On
-    LastExt := ""
-    Loop % NewFiles[0]
-    {
-        File := RegExReplace(NewFiles[A_Index], "\(.*", "")
-        Ext := RegExReplace(NewFiles[A_Index], "(.*\(|\)\[.*)", "")
-        MenuFile := Chr(A_Index+64) . " >> " . File . "(" Ext . ")"
-        ; 去除重复的文件，只有连续出现的情况有效
-        if (Ext = LastExt)
-        {
-            continue
-        }
-        LastExt := Ext
-
-        Menu, TC_CreateNewFile, Add, %MenuFile%, NewFile
-
-        IconFile := RegGetNewFileIcon(Ext)
-        IconFile := RegExReplace(IconFile, "i)%systemroot%", A_WinDir)
-        IconFile := RegExReplace(IconFile, "i)%ProgramFiles%", A_ProgramFiles)
-        IconFilePath := RegExReplace(IconFile, ",-?\d*", "")
-        StringReplace, IconFilePath, IconFilePath, ", , A
-        if Not FileExist(IconFilePath)
-            IconFilePath := ""
-        IconFileIndex := RegExReplace(IconFile, ".*,", "")
-        IconFileIndex := IconFileIndex>=0?IconFileIndex+1:IconFileIndex
-        ;MsgBox, %IconFile%_%IconFilePath%_%IconFileIndex%
-        if Not RegExMatch(IconFileIndex, "^-?\d*$")
-            IconFileIndex := ""
-        if RegExMatch(Ext, "\.lnk")
-        {
-            IconFilePath := A_WinDir . "\system32\Shell32.dll"
-            IconFileIndex := "264"
-        }
-        Menu, TC_CreateNewFile, Icon, %MenuFile%, %IconFilePath%, %IconFileIndex%
-    }
-}
 
 ; 获取新建文件的源
 ; reg 为后缀

    Gui, Add, Button, x162 y80 w90 h30 gNewFileOk default, 确认(&S)
    Gui, Add, Button, x282 y80 w90 h30 gNewFileClose , 取消(&C)
    Gui, Show, w400 h120, 新建文件
    if FileExt
    {
        Controlget, nf, hwnd, , edit2, A

    Menu, MarkMenu, Show, %xn%, %yn%
return

<TC_CreateNewFile>:
    ControlGetFocus, TLB, ahk_class TTOTAL_CMD
    ControlGetPos, xn, yn, , , %TLB%, ahk_class TTOTAL_CMD

    Menu, FileTemp, Add
    Menu, FileTemp, DeleteAll
    Menu, FileTemp, Add , F >> 文件夹, <cm_Mkdir>
    Menu, FileTemp, Icon, F >> 文件夹, %A_WinDir%\system32\Shell32.dll, 4
    Menu, FileTemp, Add , S >> 快捷方式, <cm_CreateShortcut>

    if A_OSVersion in WIN_2000, WIN_XP
        Menu, FileTemp, Icon, S >> 快捷方式, %A_WinDir%\system32\Shell32.dll, 30 ; 我测试 xp 下必须是 30
    else
        Menu, FileTemp, Icon, S >> 快捷方式, %A_WinDir%\system32\Shell32.dll, 264 ; 原来是 264，xp 下反正是有问题

    FileTempMenuCheck()
    Menu, FileTemp, Show, %xn%, %yn%
return
