mIRC Home    About    Download    Register    News    Help

Print Thread
#42669 18/08/03 03:35 AM
I
Iceman0145
Iceman0145
I
I have tried this script out and I can't get it to work

Code:
 
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

#42670 18/08/03 03:37 AM
Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
use .did, not the identifier $did

/did -a $dname 2 $uptime(system,2)

#42671 18/08/03 03:41 AM
S
ScatMan
ScatMan
S
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


#42672 18/08/03 09:09 AM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
Why not use something along the lines of..
Code:
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
}

#42673 18/08/03 09:26 AM
Joined: Dec 2002
Posts: 1,253
H
Hoopy frood
Offline
Hoopy frood
H
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( )?

#42674 18/08/03 06:15 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
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..

#42675 18/08/03 06:18 PM
Joined: Dec 2002
Posts: 3,015
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,015
Tried $uptime(system,1)?

#42676 18/08/03 10:27 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
Ahh, that does work. grin


Link Copied to Clipboard