The overlap should be okay here since any non-zero value implies it is enabled ie. ($dqwindow == 1) means it is enabled, ($dqwindow == 2) means it is enabled, about to be opened and written to, and ($dqwindow == 3) means it is enabled, already open and about to be written to. This will be in the next beta.

Update: the more I look into it, the more contexts there are, eg. the message window is open but not currently enabled, or if halted in on ^text/^action, the window will not be opened or written to, which may be useful to know in the following on text/action, or /dqwindow may be used in on ^text/^action to change its on/off/show/hide state, and so on. However, the more contexts I add to $dqwindow, the more if comparisons you will need to make. Also, I will likely need to make $dqwindow use bitfields ie. ($dqwindow & 1) = enabled in IRC/Options, etc. to represent all of the contexts.

Update: I have whittled it down to the following states:

Code:
on ^*:TEXT:*:*:{
  echo 5 ^TEXT event
  dqwindowstate
}
on *:TEXT:*:*:{
  echo 5 TEXT event
  dqwindowstate
}
alias dqwindowstate {
  echo State: $iif($dqwindow & 1,enabled,not enabled)
  echo State: $iif($dqwindow & 2,open,not open)
  echo State: $iif($dqwindow & 4,opening,not opening)
  echo State: $iif($dqwindow & 8,writing,not writing)
  echo State: $iif($dqwindow & 16,written,not written)
}

Last edited by Khaled; 26/02/17 11:56 AM.