mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
This dialog works, but it takes about .23 seconds for each entry.
Anyone know of a way to get it to work faster?
Code:
dialog xLine {
  title "xLine Report"
  size -1 -1 535 350
  option dbu
  button "Close", 1, 5 2 37 12, default ok cancel
  button "Remove", 2, 45 2 37 12
  tab "G:Line", 3, 5 15 526 259
  text "Line", 4, 5 30 20 8, tab 3 center
  list 5, 5 37 20 150, tab 3 size extsel
  text "Address", 6, 25 30 150 8, tab 3 center
  list 7, 25 37 150 150, tab 3 size extsel hsbar
  text "Expiry", 8, 175 30 100 8, tab 3 center
  list 9, 175 37 100 150, tab 3 size extsel
  text "Set By", 10, 275 30 150 8, tab 3 center
  list 11, 275 37 150 150, tab 3 size extsel hsbar
  text "Reason", 12, 425 30 100 8, tab 3 center
  list 13, 425 37 100 150, tab 3 size extsel hsbar
  tab "Z:Line", 14
  text "Line", 15, 5 30 20 8, tab 14 center
  list 16, 5 37 20 150, tab 14 size extsel
  text "Address", 17, 25 30 150 8, tab 14 center
  list 18, 25 37 150 150, tab 14 size extsel hsbar
  text "Expiry", 19, 175 30 100 8, tab 14 center
  list 20, 175 37 100 150, tab 14 size extsel
  text "Set By", 21, 275 30 150 8, tab 14 center
  list 22, 275 37 150 150, tab 14 size extsel hsbar
  text "Reason", 23, 425 30 100 8, tab 14 center
  list 24, 425 37 100 150, tab 14 size extsel hsbar
  tab "GZ:Line", 25
  text "Line", 26, 5 30 20 8, tab 25 center
  list 27, 5 37 20 150, tab 25 size extsel
  text "Address", 28, 25 30 150 8, tab 25 center
  list 29, 25 37 150 150, tab 25 size extsel hsbar
  text "Expiry", 30, 175 30 100 8, tab 25 center
  list 31, 175 37 100 150, tab 25 size extsel
  text "Set By", 32, 275 30 150 8, tab 25 center
  list 33, 275 37 150 150, tab 25 size extsel hsbar
  text "Reason", 34, 425 30 100 8, tab 25 center
  list 35, 425 37 100 150, tab 25 size extsel hsbar
}
menu * {
  xLine : xLine
}
alias xLine {
  dialog $iif(!$dialog(xLine),-md,-ev) xLine xLine
}
on *:dialog:xLine:init:0:{
  .enable #KLine_Report
  .stats K
  .enable #GLine_Report
  .stats G
}
#KLine_Report off
raw 219:*:{
  .disable #KLine_Report
  haltdef
}
raw 216:*:{
  if $2 == Z {
    did -a xLine 16 $2
    did -a xLine 18 $3
    did -a xLine 24 $4-
  }
}
#KLine_Report end
#GLine_Report on
raw 219:*:{
  .disable #KLine_Report
  haltdef
}
raw 223:*:{
  if $2 == Z {
    did -a xLine 27 $2
    did -a xLine 29 $3
    did -a xLine 31 $iif($4,$asctime($calc($4 + $ctime)),Never)
    did -a xLine 33 $6
    did -a xLine 35 $7-
  }
  else {
    did -a xLine 5 $2
    did -a xLine 7 $3
    did -a xLine 9 $iif($4,$asctime($calc($4 + $ctime)),Never)
    did -a xLine 11 $6
    did -a xLine 13 $7-
  }
}
#GLine_Report end

Joined: Dec 2004
Posts: 66
B
Babel fish
Offline
Babel fish
B
Joined: Dec 2004
Posts: 66
I have a script something like that, except of using a dialog it uses a custom list window, I like the font and color control it gives me. For commands such as removing a gline it has a popup menu for the window.

I’m on dialup, so speed is an issue for me too, instead of closing the zline window when I’m not viewing it I hide it, and use On Snotice routines to update it as glines are added, removed, etc.

If you prefer a dialog you can use a hidden custom window for storing the lists and each time the dialog opens load the info from there. Using a window instead of a hash table is nice because it preserves the order.

Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
I don't see anything that can be changed to save speed and still keep the functionality that you have there. You could load the full xLine into a single box (rather than separating it), but that would defeat the purpose, I think.

-genius_at_work

Joined: Jun 2004
Posts: 19
Q
Pikka bird
Offline
Pikka bird
Q
Joined: Jun 2004
Posts: 19
What kind of machine are you scripting on?

Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
This is a PIV 1.7 with 512M ram, however, I know of at least one person that may be using this dialog and only has a PIII 700 with 256M ram. I figured if it's noticably slow on my system, then it's really going to be noticable on his.


Link Copied to Clipboard