mIRC Home    About    Download    Register    News    Help

Print Thread
#21685 30/04/03 11:01 PM
M
MTech
MTech
M
how can i continueously add up my uptime for windows? maybe a lil editing windows? or a script that adds the uptimes up?

#21686 01/05/03 12:07 AM
Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
on 1:START: {
if (!%uptime) { /set -u0 %uptime $calc($uptime(system) / 1000) }
}

on 1:EXIT: {
/inc -u0 %uptime $calc($uptime(system) / 1000)
}

menu * {
say uptime: /msg $active Uptime: $duration(%uptime)
}

#21687 01/05/03 12:26 AM
M
MTech
MTech
M
that didnt work

#21688 01/05/03 02:48 AM
C
codemastr
codemastr
C
What exactly do you mean by "adds the uptimes"?

#21689 01/05/03 03:27 AM
Joined: Dec 2002
Posts: 1,518
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,518
why not read the uptime at set intervals and write it to an ini section somewhere ... then if u ever need to call for it like to find your record uptime ..... there u go right there read it from the ini

ive probably responded to the wrong nick and i appologize for that in advance

#21690 01/05/03 03:30 AM
N
nitestarzz
nitestarzz
N
try this /.timerUptime 0 1 echo -a $uptime(system,1)

maybe this is wat u want ... just change the command =)

#21691 01/05/03 09:09 AM
Joined: Dec 2002
Posts: 191
N
Vogon poet
Offline
Vogon poet
N
Joined: Dec 2002
Posts: 191
How are you supposed to display the contents of a variable from a popup when you unset it after the scrip setting it ends.

#21692 01/05/03 09:52 AM
Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
Just force of habit.. i accidently put that there. I almost never make a global variable. I usually use ini for starage, not vars. Mymistake.

#21693 01/05/03 03:46 PM
B
BoXeRn_
BoXeRn_
B
Try This N00bz laugh :

menu * {
Say Uptime:/msg $active My $os Uptime Is $uptime(system,1)
}
cool

#21694 01/05/03 06:23 PM
T
Terror_Vdb
Terror_Vdb
T
read idiót

#21695 01/05/03 07:15 PM
M
MTech
MTech
M
i want a never resetting uptime, when i shout down crash or restart my pc, i want mirc to just add on the the current uptime that it has recorded

#21696 01/05/03 07:59 PM
Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
on 1:START: {
.timeruptime 0 1 /uptime.chk
}

alias uptime.chk {
if (!%uptime.full) { /set %uptime.full $uptime(system) }
if (!%uptime.cur) { /set %uptim.cur $uptime(system) }
if ($uptime(System) < %uptime.cur) {
/inc %uptime.full %uptime.cur
/set %uptime.cur $uptime(system)
}
}

*untested*

#21697 01/05/03 08:24 PM
M
MTech
MTech
M
how do i say that in $uptime(system,1) format?

#21698 01/05/03 08:28 PM
Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
you need to announce the %uptime.full + %uptime.cur

Add them, divide by 100 (to convert from milliseconds) and then duration.

#21699 01/05/03 09:57 PM
C
codemastr
codemastr
C
to convert from milliseconds to seconds, you divide by 1000. If you divide by 100 you are converting to deciseconds.

#21700 01/05/03 10:00 PM
Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
I meant to type another 0 too, heh thanks codemaster


Link Copied to Clipboard