mIRC Home    About    Download    Register    News    Help

Print Thread
Timestamps in custom windows #264923
01/02/19 11:39 AM
01/02/19 11:39 AM
Joined: Apr 2018
Posts: 76
E
Erasimus Offline OP
Babel fish
Erasimus  Offline OP
Babel fish
E

Joined: Apr 2018
Posts: 76
I just cant seem to get them working, unless I hand code the timestamp on each line I send to the custom window using $asctime(dd/mm/yy - HH:nn:ss), which is approx what I have set the global timestamp to.

I have checked the custom window' stamp property ($window(@name).stamp) and it is true, but nothing appears, unless, as I said, I hand code it. The status and all channel windowss show the timestamp ok.

Does onyone know how to do this ? or is it not possible ? Currently those script lines sending to custom windows are quite long.

Re: Timestamps in custom windows [Re: Erasimus] #264926
01/02/19 03:16 PM
01/02/19 03:16 PM
Joined: Jul 2006
Posts: 3,515
France
W
Wims Offline
Planetary brain
Wims  Offline
Planetary brain
W

Joined: Jul 2006
Posts: 3,515
France
How are you adding line to the custom window? /echo and /aline have a -t switch for timestamping messages.

Note that $timestamp can also be used to get the time if you have a format defined in the options (IRC > messages), even if timestamping is not enabled.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Timestamps in custom windows [Re: Wims] #264927
01/02/19 08:09 PM
01/02/19 08:09 PM
Joined: Apr 2018
Posts: 76
E
Erasimus Offline OP
Babel fish
Erasimus  Offline OP
Babel fish
E

Joined: Apr 2018
Posts: 76
Thanks Wims.

Quote:

/echo and /aline have a -t switch for timestamping messages.


I knew about the -t with /echo, and I cant see anything in either mirc.chm or on wikichip so didn't even know that /aline used that parameter.

Will try that.
Thanks again.

Re: Timestamps in custom windows [Re: Erasimus] #264929
01/02/19 09:49 PM
01/02/19 09:49 PM
Joined: Apr 2018
Posts: 76
E
Erasimus Offline OP
Babel fish
Erasimus  Offline OP
Babel fish
E

Joined: Apr 2018
Posts: 76
Update: WikiChips does show a -t switch for /aline but it is not for timestamps :
Quote:
-t - forces a re-wrap of all lines in a window that have not yet been wrapped to the current window size.

mIRC.chm does not mention the switch at all.

Re: Timestamps in custom windows [Re: Erasimus] #264930
01/02/19 09:59 PM
01/02/19 09:59 PM
Joined: Jul 2006
Posts: 3,515
France
W
Wims Offline
Planetary brain
Wims  Offline
Planetary brain
W

Joined: Jul 2006
Posts: 3,515
France
Ah, yeah, my mistake for /aline.

There is a /timestamp command but it doesn't seem to work for custom window, seems like you have to put the timestamp yourself.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Timestamps in custom windows [Re: Wims] #264937
02/02/19 12:44 PM
02/02/19 12:44 PM
Joined: Apr 2018
Posts: 76
E
Erasimus Offline OP
Babel fish
Erasimus  Offline OP
Babel fish
E

Joined: Apr 2018
Posts: 76
Never mind, at least you pointed $timestamp out to me, and that is shorter that all the $asctime and formatting info on each line.

Re: Timestamps in custom windows [Re: Erasimus] #264939
02/02/19 01:53 PM
02/02/19 01:53 PM
Joined: Jul 2006
Posts: 3,515
France
W
Wims Offline
Planetary brain
Wims  Offline
Planetary brain
W

Joined: Jul 2006
Posts: 3,515
France
The problem is that you cannot be sure $timestamp will have a value.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Timestamps in custom windows [Re: Wims] #264940
02/02/19 07:06 PM
02/02/19 07:06 PM
Joined: Apr 2018
Posts: 76
E
Erasimus Offline OP
Babel fish
Erasimus  Offline OP
Babel fish
E

Joined: Apr 2018
Posts: 76
Good point.

It is set on my system, so no problem there, but I will try to build some test in to my script before usage.

Re: Timestamps in custom windows [Re: Erasimus] #264963
05/02/19 12:06 AM
05/02/19 12:06 AM
Joined: Apr 2018
Posts: 76
E
Erasimus Offline OP
Babel fish
Erasimus  Offline OP
Babel fish
E

Joined: Apr 2018
Posts: 76
Issue resolved in another discussion.

I had no idea that you could use /echo to output to a custom window.

Both mirc.chn and WikiChip state that /echo is used on channel windows (#channel name) and status or active window with -s and -a respectively.

Similarily /window (and the custom window section) makes no mention of /echo, but does expressly state the use of /aline etc. causing the idea thatonly these must be used with custom windows.

Both those sources need a drastic update/clean up.