|
Iceman0145
|
Iceman0145
|
I have tried this script out and I can't get it to work
dialog uptime {
title Channel and Nick
size -1 -1 300 235
button "Ok" ,1, 0 210 70 25,ok
button "Reset" ,3, 70 210 70 25
edit "" ,2, 5 5 200 20,read
}
on *:dialog:uptime:init:0:{
$did(uptime,2) $uptime(system,2)
}
on *:dialog:uptime:sclick:3:{
$did(uptime,2) $uptime(system,2)
}
Any help would be great on this What I am trying to do is when this dialog opens up it shows the uptime in the window
|
|
|
|
Joined: Jan 2003
Posts: 2,973
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,973 |
use .did, not the identifier $did
/did -a $dname 2 $uptime(system,2)
|
|
|
|
ScatMan
|
ScatMan
|
dialog uptime { title Channel and Nick size -1 -1 300 235 button "Ok" ,1, 0 210 70 25,ok button "Reset" ,3, 70 210 70 25 edit "" ,2, 5 5 200 20,read } on *:dialog:uptime:init:0:{ did -a $dname 2 $uptime(system,2) } if that's what u meant
|
|
|
|
Joined: Dec 2002
Posts: 3,534
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,534 |
Why not use something along the lines of..
dialog uptime {
title Channel and Nick
size -1 -1 300 235
button "Ok" ,1, 0 210 70 25,ok
button "Reset" ,3, 70 210 70 25
edit "" ,2, 5 5 200 20,read
}
on *:dialog:uptime:init:0:{
set %uptime $duration($calc($ticks / 1000))
did -a $dname 2 %uptime
}
|
|
|
|
Joined: Dec 2002
Posts: 1,253
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,253 |
Why set a variable to use with $calc when mIRC already gives you the answer in $duration format with $uptime( )?
|
|
|
|
Joined: Dec 2002
Posts: 3,534
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,534 |
I used it and it only returns the minutes for me, so I used an alternative, it like, supresses the seconds..
|
|
|
|
Joined: Dec 2002
Posts: 3,015
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,015 |
|
|
|
|
Joined: Dec 2002
Posts: 3,534
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,534 |
Ahh, that does work.
|
|
|
|
|