 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
silveredge78
Joined: 25 Jul 2006 Posts: 481 Location: Midwest, USA
|
Posted: Mon Jul 20, 2009 7:32 pm Post subject: v1.0.48.3 - Time variable string? |
|
|
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 |
|
| Back to top |
|
 |
nick
Joined: 24 Aug 2005 Posts: 549 Location: Berlin / Germany
|
Posted: Tue Jul 21, 2009 1:18 pm Post subject: |
|
|
| 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  |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10716
|
Posted: Fri Sep 18, 2009 12:51 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|