mIRC Home    About    Download    Register    News    Help

Print Thread
#147017 12/04/06 05:09 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
perhaps dumb question and idea too laugh

but umm i wanted to have in script
something like when user activate AWAY event
that it activates a timer that will start to "time" how long user
was away. but uhm i dont know how to do it :P
(to use timer as watch that times something)

and if this can be done, would it use much resources of mirc or pc due to how long it would time it/last ?


IceCapped
#147018 12/04/06 05:25 PM
Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
Quote:
perhaps dumb question and idea too laugh

but umm i wanted to have in script
something like when user activate AWAY event
that it activates a timer that will start to "time" how long user
was away. but uhm i dont know how to do it :P
(to use timer as watch that times something)

and if this can be done, would it use much resources of mirc or pc due to how long it would time it/last ?


Timers should not be used to keep track of durations. Save a starting $ctime (to a global variable or hash table), Then to determine elapsed duration use:

$duration($calc($ctime - $starttime), 2)

with alias $starttime returning your start time (or sub-in variable name)


NaquadaBomb
www.mirc-dll.com
#147019 12/04/06 05:28 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
$awaytime

#147020 12/04/06 05:34 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
hi
take no offence, but thats too advanced for me (to understand) =)
also dont understand this $ctime, it says in help that it counts time since 70's :?


@mIRCManiac $awaytime gives me some weird numbers, with what number do i need to divide it to get hours.minutes.seconds ?

Last edited by raZOR; 12/04/06 05:35 PM.

IceCapped
#147021 12/04/06 05:34 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
$duration($awaytime)

$duration($awaytime,3) ?

Last edited by mIRCManiac; 12/04/06 05:36 PM.
#147022 12/04/06 05:36 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
hmmm

with //echo -a $duration($awaytime) i get 2hours and something

with //whois $me i get 15 minutes from raw :P


IceCapped
#147023 12/04/06 05:39 PM
Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
$awaytime is your $awaytime... I think the question was for other's away time... And that is reported by /whois.


NaquadaBomb
www.mirc-dll.com
#147024 12/04/06 05:41 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
Quote:
i get 15 minutes from raw


From which raw? If you mean raw 317, that's idle time, not away duration.

#147025 12/04/06 05:41 PM
Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
Quote:
hmmm

with //echo -a $duration($awaytime) i get 2hours and something

with //whois $me i get 15 minutes from raw :P


Are you confusing idle time with away time? smile


NaquadaBomb
www.mirc-dll.com
#147026 12/04/06 05:50 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
uufff
indeed i do...

i apologyse.
also why then it shows with //echo -a $duration($awaytime)
anything at all if /away wasnt activated ?


IceCapped
#147027 12/04/06 05:53 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
Because if you're not set away, $awaytime returns 0 seconds.

#147028 12/04/06 05:55 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
oh, i see.
okay, thank you both for this infos.
and sorry for me being so ignorant :P


IceCapped
#147029 12/04/06 06:45 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
here i come again ^^
i have this in dialog

box "Idle time", 15, 107 44 92 25, tab 5
text $duration($awaytime), 33, 115 56 80 8, tab 5

but every time i invoke dialog it resets time to 0
altho i am /away

any idea why ?


IceCapped
#147030 12/04/06 10:19 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Did you forget about this?

#147031 12/04/06 10:49 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
Quote:

We cannot proceed.
There was a problem looking up the post in our database.

Please use your back button to return to the previous page.


/me wonders what "this" is


IceCapped
#147032 13/04/06 12:22 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Whoops...not sure what happened there...try this link instead. The first one should've brought you to a specific reply to the initial post that the above link references.

The specific reply I was trying to relay you to is the last reply to that post.

#147033 13/04/06 12:09 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
if you think on F-keys i dont know how to pull it off
and i still dont understand why $awaytime resets on dialog
init... coz i shouldnt since its not mirc's internal idle timer but serverside.

but if you can help me i would be much grateful


IceCapped
#147034 15/04/06 11:18 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
nevermind... fixed.


IceCapped

Link Copied to Clipboard