mIRC Homepage
Posted By: Erasimus Timestamps in custom windows - 01/02/19 11:39 AM
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.
Posted By: Wims Re: Timestamps in custom windows - 01/02/19 03:16 PM
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.
Posted By: Erasimus Re: Timestamps in custom windows - 01/02/19 08:09 PM
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.
Posted By: Erasimus Re: Timestamps in custom windows - 01/02/19 09:49 PM
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.
Posted By: Wims Re: Timestamps in custom windows - 01/02/19 09:59 PM
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.
Posted By: Erasimus Re: Timestamps in custom windows - 02/02/19 12:44 PM
Never mind, at least you pointed $timestamp out to me, and that is shorter that all the $asctime and formatting info on each line.
Posted By: Wims Re: Timestamps in custom windows - 02/02/19 01:53 PM
The problem is that you cannot be sure $timestamp will have a value.
Posted By: Erasimus Re: Timestamps in custom windows - 02/02/19 07:06 PM
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.
Posted By: Erasimus Re: Timestamps in custom windows - 05/02/19 12:06 AM
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.
© mIRC Discussion Forums