Autohotkey 发送格式化的日期时间

Autohotkey send formatted datetime

我正在尝试发送在此 GUI 中选择的日期时间,但我需要以特定方式对其进行格式化。为了进行测试,我将输出发送到记事本 "Untitled"

Gui, Add, Text,, Summary
Gui, Add, Edit, vEdit
Gui, Add, Text,, Date of Change
Gui, Add, DateTime, vdatetime,
Gui, Add, Button,, OK
Gui, Show, x403 y262 h310 w392, New GUI Window
Return


ButtonOK:
Gui, Submit, NoHide

WinActivate Untitled

Send %Edit%{Enter}
Send, %datetime%,{Enter}

ExitApp

GuiClose:
ExitApp

Escape::
ExitApp
Return

当前输出为:

test Summary
20150811161206,

我需要它采用这种格式:

test Summary
8/11/2015 12:00:00 AM

如何操作?

您要找的是FormatTime

FormatTime, TimeString, %datetime%, MM/d/yy hh:mm:ss tt