Слияние кода завершено, страница обновится автоматически
Loop % NewFiles[0]
{
File := RegExReplace(NewFiles[A_Index],"(.","")
Exec := RegExReplace(NewFiles[A_Index],"(.(|)[.*)","")
MenuFile := Chr(A_Index+64) . " >> " . File . "(" Exec . ")"
Menu,CreateNewFile,Add,%MenuFile%,NewFile
IconFile := RegGetNewFileIcon(Exec)
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(Exec,"\.lnk")
{
IconFilePath := A_WinDir . "\system32\Shell32.dll"
IconFileIndex := "264"
}
Menu,CreateNewFile,Icon,%MenuFile%,%IconFilePath%,%IconFileIndex%
}