dialog fordialog { title "OperServ" option dbu size -1 -1 173 94 text "Choose the FORBID type you want to view:", 1, 6 5 257 8, read multi combo 2, 5 60 163 170, drop edit result edit "NOTE: No specific, show the first 100 available entries.", 4, 4 51 165 8, disable link "Help?", 5, 7 79 20 8 button "&OK", 6, 77 77 44 13, ok default button "&Cancel", 7, 124 77 44 13, cancel } on *:dialog:fordialog:*:*:{ if ($devent == init) { mdx SetBorderStyle $dname 4 | didtok $dname 2 44 %forb.syntax } elseif ($devent == sclick) { if ($did == 6) { if (%forbsel) { set %cfblist $v1 } else { set %cfblist $did(2).sel } set %forblist forbid os forbid list $did(2) } elseif ($did == 7) { unset %forb.syntax } elseif ($did == 5) { var %r = $specialwin | window -kea %r | os help Forbid } } elseif ($devent == edit) { var %read $did(2,0) if (%read != $null) && ($regex(%read, /[a-zA-Z]/)) { var %t $did(2).lines, %i 1 while (%i <= %t) { var %l $did(2, %i) if (%l $+ * iswm %read) { set %forbsel $calc(%i +1) %read | return } inc %i } } else { unset %forbsel } } elseif ($devent == close) { unset %forbsel } }