• Welcome to Valhalla Legends Archive.
 

Re: Wierd TimeStamp Bug

Started by Wolf, January 09, 2003, 05:43 PM

Previous topic - Next topic

Wolf

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
Seen as +i!+Wolf+i!+, (i!)~Wolf~(i!)

l)ragon

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\
*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*ˆ¨¯¯¨ˆ*^~·.,l)ragon,.-·~^*ˆ¨¯¯¨ˆ*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*

MiCrOz

#2
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

Mesiah / haiseM

#3
you dont have to format it, maybe he likes his timestamps like that..
]HighBrow Innovations
Coming soon...

AIM Online Status: 

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)

Wolf

#5
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
Seen as +i!+Wolf+i!+, (i!)~Wolf~(i!)

iago

#6
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 :)
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Blade_360

#7
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.

erase

#8
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

Yoni

#9
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?

Skywing

#10
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

Mesiah / haiseM

#11
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.
]HighBrow Innovations
Coming soon...

AIM Online Status: 

Yoni

#12
QuoteEdit cmd.exe and change the format string, naturally :P
nothx :-X