mIRC Homepage
Posted By: SladeKraven Timestamp suggestion - 23/09/07 10:44 PM
I'd like to see a $timestamp addition or a new identifier to determine whether or not timestamping is on or off.

Currently I'm using:

Code:
alias timestampstat {
  return $iif($gettok($readini(mirc.ini, options, n4), 12, 44),$true,$false)
}


Which I guess is fine, but for those who want to know if it's on or off and don't know about the reading from the mirc.ini method like myself (although I know now..), it cropped up in a different thread and noMen came up with that solution.

While I'm on the topic of timestamp, I was wondering if someone could clarify a couple of things.

1. When using the /timestamp command the mirc.ini doesn't update. So if I turn the timestamp off by command that above alias for me still returns $true and will continue to do so until I manually save the ini file.

2. When typing /timestamp on it turns it on as it should. Same with off. But when I specify a timestamp format /timestamp on [HH:nn:ss] and then typing /timestamp it says it's turned off still.
Posted By: deegee Re: Timestamp suggestion - 23/09/07 11:14 PM
Originally Posted By: SladeKraven

1. When using the /timestamp command the mirc.ini doesn't update. So if I turn the timestamp off by command that above alias for me still returns $true and will continue to do so until I manually save the ini file.

Try this
Code:
alias timestampstat window -h @!@ | var %a = $window(@!@).stamp | close -@ @!@ | return %a



Originally Posted By: SladeKraven

2. When typing /timestamp on it turns it on as it should. Same with off. But when I specify a timestamp format /timestamp on [HH:nn:ss] and then typing /timestamp it says it's turned off still.

To set the timestamp format, the command is /timestamp [color:red]-f <format>[/color]
Posted By: SladeKraven Re: Timestamp suggestion - 24/09/07 11:05 AM
Thanks for the reply, that's good that I'm no longer having to save the mirc.ini file. I wonder why it wouldn't update. I will use that for now but I do hope it gets added somewhere along the line.

Thanks for the -f switch, I've hardly ever used the /timestamp command. I see it in the help file now, thanks again for your reply.
Posted By: deegee Re: Timestamp suggestion - 24/09/07 01:03 PM
$mircini is cached in memory. Options changed via /commands aren't written to file immediately.
The $mircini file is saved when you open/close the editor, click OK in options or address book, or when you exit.
You can force a save with /saveini.

Same goes for control.ini. addrbk.ini etc (except they aren't updated with the editor opening/closing)
Posted By: SladeKraven Re: Timestamp suggestion - 24/09/07 01:08 PM
Originally Posted By: deegee
Options changed via /commands aren't written to file immediately.


That's false, the /notify command writes directly.
Posted By: deegee Re: Timestamp suggestion - 24/09/07 01:20 PM
It's not false, /notify would an exception to the rule, not the norm.
Posted By: MeStinkBAD Re: Timestamp suggestion - 15/10/07 11:55 AM
Doesn't using the /flushini command do this?
© mIRC Discussion Forums