mIRC Home    About    Download    Register    News    Help

Print Thread
#8680 28/01/03 10:56 PM
Joined: Jan 2003
Posts: 44
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2003
Posts: 44
I have the following script and I don't know why it is not working... please help me

on *:CONNECT:{
set %contime $ctime
tbar
}
alias tbar {
.timerbar 0 1 titlebar ..:: %script :: Time:[ $+ $time $+] :: Uptime:[ $+ $duration($calc($ctime - %contime)) $+ ] ::..
}

So I have the %contime variable set and I can't understand why it is not working.
When I connect the timer starts, makes the titlebar in the way I want but only once and than it disappears.

I am looking forward to have same piece of advice on my case...

10x


Regards, ThE_mASk.
#8681 29/01/03 01:24 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Here's one way to avoid the problem of identifiers and variables being evaluated before being passed to the timer:

Code:
On *:start:{
  .timerbar 0 1 tbar
}
alias tbar {
  titlebar ..:: %script :: Time:[ $+ $time $+ ] :: Uptime:[ $+ $uptime(mirc,1) $+ ] ::..
}


Another solution would be putting the string within an $eval(text,0):
Code:
On *:start:{
  .timerbar 0 1 [color:blue]$eval([/color]titlebar ..:: %script :: Time:[ $+ $time $+ ] :: Uptime:[ $+ $uptime(mirc,1) $+ ] ::..[color:blue],0)[/color]
}

#8682 29/01/03 10:42 AM
Joined: Jan 2003
Posts: 44
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2003
Posts: 44
10x A LOT !
It really worked !
=))


Regards, ThE_mASk.

Link Copied to Clipboard