mIRC Home    About    Download    Register    News    Help

Print Thread
idle time in x:xx mins format #33019 29/06/03 06:52 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
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


new username: tidy_trax
Re: idle time in x:xx mins format #33020 29/06/03 06:56 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
u can use $asctime($nick(#,%i).idle,n:ss) instead

Last edited by ScatMan; 29/06/03 06:57 PM.
Re: idle time in x:xx mins format #33021 29/06/03 07:00 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
oops blush i thought that was only for actual time, thanx sm smile


new username: tidy_trax
Re: idle time in x:xx mins format #33022 29/06/03 07:26 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
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


new username: tidy_trax
Re: idle time in x:xx mins format #33023 29/06/03 09:11 PM
Joined: Dec 2002
Posts: 191
N
Nobodi Offline
Vogon poet
Offline
Vogon poet
N
Joined: Dec 2002
Posts: 191
Try removing the !

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

Re: idle time in x:xx mins format #33024 29/06/03 09:26 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
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
}


new username: tidy_trax
Re: idle time in x:xx mins format #33025 29/06/03 09:49 PM
Joined: Dec 2002
Posts: 191
N
Nobodi Offline
Vogon poet
Offline
Vogon poet
N
Joined: Dec 2002
Posts: 191
Without seeing your timertest alias try this

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

Re: idle time in x:xx mins format #33026 29/06/03 09:57 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
* /timertest: invalid parameters frown


new username: tidy_trax
Re: idle time in x:xx mins format #33027 29/06/03 11:11 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
/timertest 0 1 /echo $asctime($calc($inmp3.pos / 1000),n:ss)

Re: idle time in x:xx mins format #33028 30/06/03 01:41 AM
Joined: Feb 2003
Posts: 2,665
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,665
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


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: idle time in x:xx mins format #33029 30/06/03 03:26 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
//timertest $calc($inmp3.length / 1000) 1 //echo -a $!asctime($calc($inmp3.pos / 1000),n:ss)



Re: idle time in x:xx mins format #33030 30/06/03 04:43 AM
Joined: Feb 2003
Posts: 2,665
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,665
$asctime($calc($timezone + $daylight + $inmp3.pos / 1000),n:ss)


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: idle time in x:xx mins format #33031 30/06/03 04:46 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
/timertest 0 1 //echo $asctime($calc($timezone + $daylight + $inmp3.pos / 1000),n:ss)

Re: idle time in x:xx mins format #33032 30/06/03 07:23 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
thanx to everyone else, but especially you grin
0:02
0:03
0:04
0:05
0:06


new username: tidy_trax
Re: idle time in x:xx mins format #33033 30/06/03 07:47 AM
Joined: Feb 2003
Posts: 2,665
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,665
Nice that you live in the UK and your $timezone == 0 and $daylight == 0... just wait, you'll see.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: idle time in x:xx mins format #33034 30/06/03 07:53 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
hmm?


new username: tidy_trax
Re: idle time in x:xx mins format #33035 30/06/03 11:46 AM
Joined: May 2003
Posts: 215
lammkott Offline
Fjord artisan
Offline
Fjord artisan
Joined: May 2003
Posts: 215
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?


- Jason
Re: idle time in x:xx mins format #33036 30/06/03 12:02 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
hmm, that updates as well shocked cheers grin


new username: tidy_trax
Re: idle time in x:xx mins format #33037 30/06/03 03:30 PM
Joined: Feb 2003
Posts: 2,665
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,665
Ooh, nice find.
* Raccoon tucks that away under his hat.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!