Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Wolf on January 09, 2003, 05:43 PM

Title: Re: Wierd TimeStamp Bug
Post by: Wolf on January 09, 2003, 05:43 PM
Heres a good time stamp function ^.^ ...

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

 :D
Title: Re: Wierd TimeStamp Bug
Post by: l)ragon on January 09, 2003, 05:52 PM
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\
Title: Re: Wierd TimeStamp Bug
Post by: MiCrOz on January 10, 2003, 04:14 AM
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
Title: Re: Wierd TimeStamp Bug
Post by: Mesiah / haiseM on January 10, 2003, 09:29 AM
you dont have to format it, maybe he likes his timestamps like that..
Title: Re: Wierd TimeStamp Bug
Post by: MiCrOz on January 10, 2003, 06:42 PM
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)
Title: Re: Wierd TimeStamp Bug
Post by: Wolf on January 10, 2003, 08:39 PM
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
Title: Re: Wierd TimeStamp Bug
Post by: iago on January 13, 2003, 01:40 PM
Quotehh: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

I prefer using a 24-hour clock, but that's just me :)
Title: Re: Wierd TimeStamp Bug
Post by: Blade_360 on January 14, 2003, 11:29 AM
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.
Title: 0Re: Wierd TimeStamp Bug
Post by: erase on January 15, 2003, 06:14 PM
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
Title: Re: Wierd TimeStamp Bug
Post by: Yoni on January 16, 2003, 04:13 AM
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?
Title: Re: Wierd TimeStamp Bug
Post by: Skywing on January 16, 2003, 12:19 PM
QuoteMy 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?
Edit cmd.exe and change the format string, naturally :P
Title: Re: Wierd TimeStamp Bug
Post by: Mesiah / haiseM on January 16, 2003, 04:08 PM
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.
Title: Re: Wierd TimeStamp Bug
Post by: Yoni on January 18, 2003, 02:55 AM
QuoteEdit cmd.exe and change the format string, naturally :P
nothx :-X