Sign in to follow this  
Followers 0
Aceguy

changing 1 to 01 in a clock.

4 posts in this topic




Hi,

ConsoleWrite(_secToHMS() & @CRLF)

Func _secToHMS($i_seconds = 0)
    If $i_seconds < 0 Then Return -1
    Return StringFormat('%.02d:%.02d:%.02d', Mod($i_seconds / 3600, 24), Mod(($i_seconds / 60), 60),Mod($i_seconds, 60))
EndFunc  ;==>_secToHMS

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

its ok, it worked the above :) DOH

You might also find it useful to have a look at the StringFormat() function

For your clock application the following would work

$i_min_int = StringFormat("%02i",$i_min_int)

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0