Zmodem commented on a Page, Run Dialog In MIRC  -  Sep 02, 2008

StaticX__: Perhaps disabling the OK button on the dialog init event will help to solve your OK button issues? Change the init event for the run dialog to this:

ON *:DIALOG:run:init:0: {
  history.check
  did -b run 6
}

Also, you will want to enable this feature when the combo-box is editted/sclicked:

ON *:DIALOG:run:*:6: {
  if (($devent == sclick) || ($devent == edit)) {
    did - $+ $iif($remove($did(6),$chr(32)) != $null,e,b) run 7
  }
}

You get an error if you click 'Clear History' and then close the dialog immediately. This is because of the timer for that command. Use this in place of your clear event, plus the timer event:

on *:dialog:run:sclick:10:{
  if ($hget(run)) {
    clrmemory
    history.check
    dialog -t run History cleared.. | .timer 1 1 tChange
  }
}
alias -l tChange $iif($dialog(run),dialog -t run Run)

Also, when I clicked on Clear History without having a history, I got this error: * /hfree: no such table 'run' . This is because there is no error-checking for if the table exists. You will notice that in the above code, I have already included the fix for this, which is: if ($hget(run)) { ... }. Essentially, your best option would be like the one I have for the OK button, which would be to disable the Clear History button until a history has been made. Enjoy!

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.