Yoko
http://forum.yoko.com.ua/

print hour
http://forum.yoko.com.ua/viewtopic.php?f=17&t=13609
Page 1 of 1

Author:  motxu [ 2008-05-22 14:04:35 ]
Post subject:  print hour

need a macro that prints date and hour plz :D
Got one, but dont work :(

Author:  Kynep [ 2008-05-22 20:03:49 ]
Post subject:  Re: print hour

motxu wrote:
need a macro that prints date and hour plz :D
Got one, but dont work :(


This is script.
Code:
Sub MakeTime()
   VAR D, T, Ret, i
   Ret = STR(UO.Time())
   T = ""
   For i = 0 To Len(Ret)
      T = Ret[Len(Ret)-i] + T
      If (I == 2) OR (I == 4) Then
         T = ":" + T
      EndIf
   Next
   Ret = STR(UO.Date())
   D = ""
   For i = 0 To Len(Ret)
      D = Ret[Len(Ret)-i] + D
      If (I == 2) OR (I == 4) Then
         D = "." + D
      EndIf
   Next
   Ret = T + " @ " + D
   RETURN Ret
end sub


And this is some example:
Code:
var test()
VAR Time
Time = MakeTime()
UO.Print(Time)
end sub


I hope you understand. Just one thing, all scripts must be in same script file.

Author:  motxu [ 2008-05-22 23:06:54 ]
Post subject: 

thanks bro :D

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/