#SingleInstance force
#NoEnv
OnExit,GuiClose
Appname = Sort and TimeStamp files
GuiText = Drag files here...
Idle = Ready...
Work = Working....
Menu,Tray,NoStandard
Menu,Tray,Add,%appname% &close,GuiClose
Menu,Tray,Tip,%appname%
Gui +AlwaysOnTop +Owner
Gui, Font, S10 CDefault, Verdana
Gui, Add, Text, x16 y17 w250 h30, %GuiText%
Gui, Font, S08 CDefault, Verdana
Gui, Add, StatusBar,,%idle%
Gui, Show, x297 y258 h65 w250,%appname%
Return
GuiDropFiles:
SB_SetText(work)
Loop, parse, A_GuiControlEvent, `n
{
If TheList=
TheList = %A_LoopField%
else
TheList = %TheList%`n%A_LoopField%
}
sort, TheList
zeit := a_now
Loop, parse, TheList,`n
{
FileSetTime,%zeit%,%A_LoopField%,M
FileSetTime,%zeit%,%A_LoopField%,C
FileSetTime,%zeit%,%A_LoopField%,A
zeit := zeit +1
}
SB_SetText(idle)
return
GuiClose:
Gui,Destroy
ExitApp