mIRC Home    About    Download    Register    News    Help

Print Thread
#15350 14/03/03 10:03 PM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
im using a dialog to display mirc server system uptime, dcc gets sends and if im connected or not and nick

how do i auto refesh the dialog contents?

Last edited by MTech; 14/03/03 11:09 PM.
#15351 14/03/03 10:08 PM
Joined: Dec 2002
Posts: 271
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 271
make an alias that sets all the appropriate info into the dialog...
and run a timer that will call that alias every X seconds...

or

you can watch for events, such as,
on *:connect

and check to see if that dialog is open on the events, and if it is, call the alias that sets the info...

if you dont understand what i mean, i or someone can make a simple example for you.

#15352 14/03/03 10:11 PM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
how do i do the timer? with out loops preferably

#15353 14/03/03 10:24 PM
Joined: Dec 2002
Posts: 271
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 271
ok, i'll make an example dialog, one with a list box, that will list everyones nickname in it....

Code:
  

alias show.nicks {
  dialog -m chan.nicks chan.nicks
}
dialog chan.nicks {
  title "New Project"
  size -1 -1 96 100
  option dbu
  box "Users In Channel:", 1, 1 0 94 87
  list 2, 3 9 90 76, size hsbar vsbar
  button "Done", 3, 29 89 37 10, ok
}
on *:dialog:chan.nicks:init:0 {
  get.nicks $dname $comchan($me,1)
}
on *:join:*:{
  if ($nick != $me) {
    $iif($dialog(chan.nicks),get.nicks chan.nicks $chan)
  }
}
on *:part:*:{
  if ($nick != $me) {
    $iif($dialog(chan.nicks),get.nicks chan.nicks $chan)
  }
}
;etc
;etc
alias -l get.nicks {
  did -r $1 2
  var %a = 1, %b
  while ($nick($2,%a)) {
    %b = $ifmatch
    did -a $1 2 $iif(%b isop $2,@ $+ %b,%b)
    inc %a
  }
  did -z $1 2
  did -ra $1 1 Users In Channel: $2
}




Just an example of how you can tie your events into your dialog...

#15354 14/03/03 10:54 PM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
1 it took the 1st channel listed
2 it didnt list any name
3 i cant figure out how to update my dialog from that. i want to use a timer, and not events, so it stays updated to the current time

#15355 14/03/03 11:10 PM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
here is the dialog im working on:
http://mtech.vze.com/mirc.html

so you can get in idea of how to help me

#15356 15/03/03 02:07 AM
Joined: Dec 2002
Posts: 40
C
Ameglian cow
Offline
Ameglian cow
C
Joined: Dec 2002
Posts: 40
i dunno if this is what your looking for.

Code:
alias timea {
  if (%update == 1) {
    .timer 1 1 did -i first 11 1 $asctime(dddd dd of mmmm yyyy hh:nn:ssTT)
    .timer 1 1 /timea
  }
  else { /halt }
}


this is an alias that replaces id 11 every second and displays the current time. and use this

on *:DIALOG:first:init:0:{
/timea
}
This works, you just have to change for your stuff.

Coca-Bear


Link Copied to Clipboard