Autohotkey AHK-如果差值大于10

Autohotkey AHK-如果差值大于10,autohotkey,Autohotkey,每10秒自动生成一个图像文件,我的脚本的目的是在自动生成图像失败时提示。我已经包括了MsgBox用于说明,似乎在我检查差异的结构中存在错误,有人可以帮助我吗 `:: FileGetTime, Updated, C:\auto-generated-image.png, M FormatTime, Updated, %Updated%, HHmmss MsgBox, Time Now: %A_Hour%%A_Min%%A_Sec% ; for illustration MsgBox, File Up

每10秒自动生成一个图像文件,我的脚本的目的是在自动生成图像失败时提示。我已经包括了MsgBox用于说明,似乎在我检查差异的结构中存在错误,有人可以帮助我吗

`::
FileGetTime, Updated, C:\auto-generated-image.png, M
FormatTime, Updated, %Updated%, HHmmss
MsgBox, Time Now: %A_Hour%%A_Min%%A_Sec% ; for illustration
MsgBox, File Updated: %Updated% ; for illustration
**if (%A_Hour%%A_Min%%A_Sec% - Updated) > 10**
MsgBox, Image Auto Generation Has Failed! 
return

如果有其他方法可以这样做,请发表评论,谢谢

找到答案,```::FileGetTime,Updated,C:\auto-generated-image.png,M var1:=A_now var2:=A_now var3:=A_now-Updated If(var3>10)MsgBox,图像自动生成失败!返回````
::
FileGetTime, Updated, C:\auto-generated-image.png, M
var1 := A_now
var2 := Updated
var3 := A_now - Updated
if (var3 > 10)
MsgBox, Image Auto Generation Has Failed
return