print hour

Ask for scripts here

Moderators: Murderator+, Murderator

Post Reply
motxu
Posts: 48
Joined: 2005-04-13 16:01:09
Contact:

print hour

Post by motxu »

need a macro that prints date and hour plz :D
Got one, but dont work :(
Image
Kynep
Expert!
Posts: 1348
Joined: 2006-02-07 08:51:40
Location: г. Старый Оскол
Contact:

Re: print hour

Post by Kynep »

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


This is script.

Code: Select all

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: Select all

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.
motxu
Posts: 48
Joined: 2005-04-13 16:01:09
Contact:

Post by motxu »

thanks bro :D
Post Reply