Valhalla Legends Forums Archive | Battle.net Bot Development | Re: Wierd TimeStamp Bug

AuthorMessageTime
Wolf
Heres a good time stamp function ^.^ ...

[code]Private Sub Socket_Connect()
   Call AddText("Connected!" & vbCrLf, vbGreen, True)
End Sub


Public Sub AddText(ByVal strText As String, lngColour As Long, Optional blnTimeStamp As Boolean)
   If blnTimeStamp = True Then
       With frmMain.rtfDisplay
           .SelStart = Len(.Text)
           .SelLength = 0
           .SelColor = vbWhite
           .SelText = "[" & Time & "]" & Space(1)
       End With
       
       With frmMain.rtfDisplay
           .SelStart = Len(.Text)
           .SelLength = 0
           .SelColor = lngColour
           .SelText = strText
       End With
   Else
       With frmMain.rtfDisplay
           .SelStart = Len(.Text)
           .SelLength = 0
           .SelColor = lngColour
           .SelText = strText
       End With
   End If
End Sub[/code]

:D
January 9, 2003, 11:43 PM
dRAgoN
LOL /me wonders why the header of this thread got removed.
was a rather Cough* Messed up question though.
which is why i removed my fix for him made the thread look like i started it 8\
January 9, 2003, 11:52 PM
MiCrOz
When u use "Time" dont you have to format is to be hh:mm:ss or it'll come out as like 10:30 PM

I think the code is like Format(Time, "hh:mm:ss") or something, correct me if im wrong
January 10, 2003, 10:14 AM
MesiaH
you dont have to format it, maybe he likes his timestamps like that..
January 10, 2003, 3:29 PM
MiCrOz
Ok, lemme reword myself, you dont HAVE to use a hh:mm:ss format, its just the most general used format and also one of the easiest i feel to use for time stamps (or just hh:mm)
January 11, 2003, 12:42 AM
Wolf
hh:mm:ss AM/PM is just something I use all the time, more presised for quoting flamers

if you wan to get really accurate...
use "<" & Date & Space(1) & Time & ">" & Space(1)
:D
January 11, 2003, 2:39 AM
iago
[quote]hh:mm:ss AM/PM is just something I use all the time, more presised for quoting flamers

if you wan to get really accurate...
use "<" & Date & Space(1) & Time & ">" & Space(1)
:D[/quote]

I prefer using a 24-hour clock, but that's just me :)
January 13, 2003, 7:40 PM
Blade_360
I like the one I have that says like 3:29 PM and since it's my bot I think I'll keep it like that  ;D thanks for all the help none the less.
January 14, 2003, 5:29 PM
erase
blade when you do that the text isn't "smooth"
Eg:
[12:58] <erase> What's up?
[1:01] <blade> nothing much

it may be even worse: [1:1], but i'm not really sure and too lazy to check
January 16, 2003, 12:14 AM
Yoni
My cmd with PROMPT=[$T$H$H$H] $P$G has a similar annoyance: When the hour contains one digit, it pads with a space: [ X:XX:XX] instead of [0X:XX:XX], anyone know how to fix?
January 16, 2003, 10:13 AM
Skywing
[quote]My cmd with PROMPT=[$T$H$H$H] $P$G has a similar annoyance: When the hour contains one digit, it pads with a space: [ X:XX:XX] instead of [0X:XX:XX], anyone know how to fix?[/quote]
Edit cmd.exe and change the format string, naturally :P
January 16, 2003, 6:19 PM
MesiaH
gotta love vb's format function, or even if u dont wanna use the format function, you could use an iif() statement to customize it all nice and pretty.
January 16, 2003, 10:08 PM
Yoni
[quote]
Edit cmd.exe and change the format string, naturally :P[/quote]
nothx :-X
January 18, 2003, 8:55 AM

Search