Autohotkey 自动热键:写入然后读取formattime与formattime的结果不同

Autohotkey 自动热键:写入然后读取formattime与formattime的结果不同,autohotkey,ini,Autohotkey,Ini,这是我的密码: IniRead, intLastMyDate, c:\temp\test.ini, section1, intLastMyDate, 130101 formattime, intCurrentMyDate, A_Now, yyMMdd ; if the ini has a date stored that is less than today, I will want to ; include code that restarts some other variabl

这是我的密码:

IniRead, intLastMyDate, c:\temp\test.ini, section1, intLastMyDate, 130101

formattime, intCurrentMyDate, A_Now, yyMMdd

; if the ini has a date stored that is less than today, I will want to 
;    include code that restarts some other variables for a new day
; but if the date is the same as today, I want to leave those values alone,
;    no matter how many times I reload the script after fiddling with the code
if intLastMyDate < intCurrentMyDate
   {
   IniWrite, %intCurrentMyDate%, c:\temp\test.ini, section1, intLastMyDate
      ; following just to show failure of test to do what I expect
   MsgBox, if condition evals %intLastMyDate% < %intCurrentMyDate% as true
   }
InRead,intLastMyDate,c:\temp\test.ini,第1节,intLastMyDate,130101
formattime,intCurrentMyDate,A_Now,yyMMdd
; 如果ini存储的日期小于今天,我将希望
;    包括为新的一天重新启动一些其他变量的代码
; 但是如果日期和今天一样,我想不去管那些值,
;    不管我在修改代码后重新加载脚本多少次
如果intLastMyDate
第一次加载脚本时,结果与预期一致。当我重新加载它时,它似乎认为130510(我发布这篇文章的那天)比130510小。这是数据类型问题吗?“帮助”中说,任何看起来像数字的东西都会以数字的形式出现…

更改一行:

if (intLastMyDate < intCurrentMyDate)
if(intLastMyDate