mIRC Homepage
Posted By: pheonix idle time in x:xx mins format - 29/06/03 06:52 PM
amsg Idle Time: $iif($len($mid($calc($nick($chan,%i).idle / 60),1-,4))) == 1,$mid($calc($nick($chan,%i).idle / 60),1-,4)) $+ 0 mins,$mid($calc($nick($chan,%i).idle / 60),1-,4)) mins)

while (%i <= $nick($chan,0)) {
if ($2 iswm $nick($chan,%i)) {
.set %cpnick $nick($chan,%i)
}
inc %i
}

i came up with that but it says invalid parameters, any ideas frown ?? thanx in advance
its all part of a bigger remote but thats the problem area
Posted By: ScatMan Re: idle time in x:xx mins format - 29/06/03 06:56 PM
u can use $asctime($nick(#,%i).idle,n:ss) instead
Posted By: pheonix Re: idle time in x:xx mins format - 29/06/03 07:00 PM
oops blush i thought that was only for actual time, thanx sm smile
Posted By: pheonix Re: idle time in x:xx mins format - 29/06/03 07:26 PM
do you know why this doesnt work(im posting it here so i dont get flamed for new threads) thanx for any help

/timertest $calc($inmp3.length / 1000) 1 //echo -a $asctime($calc($!inmp3.pos / 1000),n:ss)

it always echo 0:00 it doesnt update. frown
Posted By: Nobodi Re: idle time in x:xx mins format - 29/06/03 09:11 PM
Try removing the !

//echo -a $asctime($calc($!inmp3.pos / 1000),n:ss)
Posted By: pheonix Re: idle time in x:xx mins format - 29/06/03 09:26 PM
i tried that, but it does the same.
the reason i added the ! is because the following alias works:
alias posupdate {
did -z mp3 9 0 $inmp3.length
/timerupdate -m 0 1 did -c mp3 9 $!inmp3.pos
}
Posted By: Nobodi Re: idle time in x:xx mins format - 29/06/03 09:49 PM
Without seeing your timertest alias try this

/timertest $calc($inmp3.length / 1000) 1 echo -a $!asctime($calc($inmp3.pos / 1000),n:ss)
Posted By: pheonix Re: idle time in x:xx mins format - 29/06/03 09:57 PM
* /timertest: invalid parameters frown
Posted By: SladeKraven Re: idle time in x:xx mins format - 29/06/03 11:11 PM
/timertest 0 1 /echo $asctime($calc($inmp3.pos / 1000),n:ss)
Posted By: Raccoon Re: idle time in x:xx mins format - 30/06/03 01:41 AM
You have to take $timezone and $daylight offsets into consideration when using $asctime for a duration.

var %i = 1
echo -a $asctime($calc($timezone + $daylight + %i),n:ss)
echos 0:01

- Raccoon
Posted By: ScatMan Re: idle time in x:xx mins format - 30/06/03 03:26 AM
//timertest $calc($inmp3.length / 1000) 1 //echo -a $!asctime($calc($inmp3.pos / 1000),n:ss)


Posted By: Raccoon Re: idle time in x:xx mins format - 30/06/03 04:43 AM
$asctime($calc($timezone + $daylight + $inmp3.pos / 1000),n:ss)
Posted By: SladeKraven Re: idle time in x:xx mins format - 30/06/03 04:46 AM
/timertest 0 1 //echo $asctime($calc($timezone + $daylight + $inmp3.pos / 1000),n:ss)
Posted By: pheonix Re: idle time in x:xx mins format - 30/06/03 07:23 AM
thanx to everyone else, but especially you grin
0:02
0:03
0:04
0:05
0:06
Posted By: Raccoon Re: idle time in x:xx mins format - 30/06/03 07:47 AM
Nice that you live in the UK and your $timezone == 0 and $daylight == 0... just wait, you'll see.
Posted By: pheonix Re: idle time in x:xx mins format - 30/06/03 07:53 AM
hmm?
Posted By: lammkott Re: idle time in x:xx mins format - 30/06/03 11:46 AM
Why goto to all the trouble of working out that when $gmt($calc($inmp3.pos / 1000),n:ss) would return the exact same thing with less effort?
Posted By: pheonix Re: idle time in x:xx mins format - 30/06/03 12:02 PM
hmm, that updates as well shocked cheers grin
Posted By: Raccoon Re: idle time in x:xx mins format - 30/06/03 03:30 PM
Ooh, nice find.
* Raccoon tucks that away under his hat.
© mIRC Discussion Forums