AutoHotkey Community

It is currently May 26th, 2012, 10:49 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: July 20th, 2009, 8:32 pm 
Offline

Joined: July 25th, 2006, 7:37 pm
Posts: 490
Location: Midwest, USA
I'm not sure how, but this is a clip from an old script that worked as I needed when compiled using 1.0.47.x. I upgraded to 1.0.48.3, and needed to recompile this original script for testing. It kept skipping filling out a particular value. I am pretty sure I've limited it to this code:

Code:
...

      StringGetPos, Pos_Date, A_LoopField, %A_Space%, L3
      StringGetPos, Pos_Time, A_LoopField, %A_Space%, L4

...

    Time := SubStr(A_LoopField,Pos_Date + 1,Pos_Time - Pos_Date + 1)
    Time = %Time%
    Time = 00000000%Time%
    StringReplace, Time, Time, :, , All
    FormatTime, Time, %Time%, h:mm tt

...

It is not the upx changing from v3.0 to v3.3, as I have tried using the old compiler with both upx versions and it works fine. But, when I use the new compiler with either upx, it comes up empty.

Any ideas? This is an important script and I'd rather not have to rewrite it if this is a bug and can be fixed. In the meantime, I just compiled it with the v 1.0.47.x compiler.

_________________
SilverEdge78


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 21st, 2009, 2:18 pm 
Offline

Joined: August 24th, 2005, 5:29 pm
Posts: 549
Location: Berlin / Germany
Changelog for 1.0.48 wrote:
Changed and fixed "if var is time" and other uses of YYYYMMDDHHMISS date-time stamps to recognize that months outside the range 1-12 are invalid. [thanks Nick]

Code:
Time = 000001001748
FormatTime, Time, %Time%, h:mm tt
MsgBox, %Time%

_________________
nick :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 18th, 2009, 1:51 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
The change to FormatTime was unintentional because it is documented that, "If the date and/or time portion of the timestamp is invalid -- such as February 29th of a non-leap year -- the date and/or time will be omitted from OutputVar."

Therefore the next release will have the following fix: "Fixed FormatTime to yield a valid time of day even when the specified month is out-of-range (broken by 1.0.48.00)."

Thanks for reporting it.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group