mIRC Home    About    Download    Register    News    Help

Print Thread
Timer suggestion #198447 28/04/08 08:28 PM
Joined: Mar 2007
Posts: 218
V
vexed2 Offline OP
Fjord artisan
OP Offline
Fjord artisan
V
Joined: Mar 2007
Posts: 218
Recently i decided to script the /timer function, to list the timers of course.
Looking at the properties i couldn't find one to show if the timer was in milliseconds or seconds, i know it's not a major flaw in mIRC or anything but as i decided to script around it to make the /timers list look more neat for my theme i ran into the problem of showing what the actual delay was in a format
IE: 500ms or 500s, it will just show 500
So i'm suggesting a new property for it, or perhaps it'd be easier to update the current one ($timer(1).delay) so it shows the suffix ms or s after it smile


Re: Timer suggestion [Re: vexed2] #198450 28/04/08 09:12 PM
Joined: Dec 2002
Posts: 2,022
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,022

This property should already exist.

Re: Timer suggestion [Re: vexed2] #198457 29/04/08 01:15 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Good idea. but I wouldn't add "ms" to a numeric value.. if anything, mIRC should represent millisecond values as decimals.. 0.3 instead of 300. Adding a suffix would mean people would have to $remove it if they wanted to do anything with the value.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: Timer suggestion [Re: argv0] #198459 29/04/08 01:55 AM
Joined: Dec 2002
Posts: 2,022
R
RoCk Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,022

I think it should return .delay as it does already and just add a .ms property to return $true if it's a ms timer or $false if not.

Re: Timer suggestion [Re: RoCk] #198460 29/04/08 03:27 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Sorry if I'm misunderstanding, but it seems to me that you're saying that a person would have to use two properties to get the delay and find out if the delay is in milliseconds or not, as having the .delay altered to return in x.xxx format would eliminate the need for the extra property.

I can see how some current scripts that use the .delay property and have something coded in them to designate if the return is in milliseconds or not might be damaged, due to the change in the format of the .delay property