Swift Posted April 3, 2008 Share Posted April 3, 2008 I was thinking StringFormat() or StringTrimLeft() but, StringTrimLeft() Wouldn't be accurate, if you took more than 99 seconds. I just need to display the seconds, and 2 digits after it. So it shows like this: $Time = TimerInit() Sleep(15000) MsgBox(0, "", TimerDiff($Time)) And, I need that to display 15.00 If anyone could help with this topic, thanks. I wish I could learn StringFormat() It's complicated though. Link to comment Share on other sites More sharing options...
monoceres Posted April 3, 2008 Share Posted April 3, 2008 (edited) You won't here's a perfectly good example without it: $timer=TimerInit() Sleep(15000) $seconds=Round(TimerDiff($timer)/1000,2) If IsInt($seconds) Then $seconds&=".00" MsgBox(0,"",$seconds) Simple and effective Edited April 3, 2008 by monoceres Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
MDCT Posted April 3, 2008 Share Posted April 3, 2008 I believe this could too: $Time = TimerInit() Sleep(1500) $Time=TimerDiff($Time)/1000 $Show =StringFormat ("%.2f",$Time) MsgBox(0, "", $Show) Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 3, 2008 Share Posted April 3, 2008 You won't here's a perfectly good example without it: $timer=TimerInit() Sleep(15000) $seconds=Round(TimerDiff($timer)/1000,2) If IsInt($seconds) Then $seconds&=".00" MsgBox(0,"",$seconds)oÝ÷ Ù(¦¦W×}ç-÷¿ªê-y&¦zØbî¶W¶)àJÚâh®fva{ +«¢+ØÀÌØíÑ¥µÈõQ¥µÉ%¹¥Ð ¤)M±À ÄÔÀÀÀ¤(ÀÌØíͽ¹ÌôMÑÉ¥¹½ÉµÐ ÅÕ½Ðì¸ÉÅÕ½Ðì°Q¥µÉ¥ ÀÌØíÑ¥µÈ¤¼ÄÀÀÀ¤)5Í ½à À°ÅÕ½ÐìÅÕ½Ðì°ÀÌØíͽ¹Ì¤ Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Swift Posted April 3, 2008 Author Share Posted April 3, 2008 Whoa! Thanks Guys! Thanks so much! So Fast, and everything! It works perfectly now! Yes! Thanks!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now