mIRC Home    About    Download    Register    News    Help

Print Thread
views.mdx click left mouse #268029 06/11/20 03:04 AM
Joined: Jul 2014
Posts: 204
TECO Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Jul 2014
Posts: 204
I detected a problem in mIRC 7.63 and beta version 7.63.1807 when using the views.mdx file.

I found that the [slclick select] condition does not work on the latest versions of mIRC, only works on older versions 6.34 of mIRC and only the condition rclick event works on newer versions.

Is it a problem that can be solved at mIRC?

[Linked Image from i.ibb.co]

Originally Posted by Result status mIRC 6.34
slclick select mouse 2
slclick select mouse 2 2
slclick select mouse 2 2 2
slclick select mouse 2 2 3
rclick event 2
rclick event 2 2
rclick event 2 2 2
rclick event 2 2 3


Originally Posted by Result status mIRC 7.63 and Beta 7.63.1807
rclick event 2
rclick event 2 2
rclick event 2 2 2
rclick event 2 2 3



Code
alias test { dialog -m test test }
alias mdx.file { return $+($scriptdir,dlls\,$1,.mdx) }

dialog test {
  title "Dialog"
  size -1 -1 162 246
  list 1, 12 10 138 204, size
  button "&OK", 2, 11 215 140 24, ok
}
on *:dialog:test:*:*:{
  if ($devent == init) {
    mdx SetControlMDX $dname 1 TreeView nohscroll haslines hasbuttons showsel > $mdx.file(views)
    load.event
  }
  elseif ($devent == sclick) {
    if ($did == 1) {
      tokenize 32 $did($did,1)
      echo $did($did,1)
    }
  }
}
alias load.event {
  var %d,%t,%a,%l = 1,%z
  did -r test 1
  did -i test 1 1 cb root
  did -a test 1 +eb 1 1 0 0 0 Info
  did -i test 1 1 cb last
  if ($isfile(info.txt)) {
    .fopen info info.txt
    while (!$feof) {
      tokenize 32 $fread(info)
      if ($regex($1-,/^0|1 \d+ .+ .+$/)) {
        %t = $asctime($2,%dateformat)
        if (%d != %t) {
          if (%a) { did -i test 1 1 cb up }
          %z = 1
          did -a test 1 +e 1 1 0 0 0 %t
          did -i test 1 1 cb last
        }
        var %d = %t,%a = 1
        did -a test 1 $iif($1,+,+b) 1 1 0 0 0 $+($gettok($3,1,33))
      }
      inc %l
    }
    .fclose info
  }
  if (!%z) { did -a test 1 + 1 1 0 0 0 No info }
}


TECO
irc.PTirc.org (Co-Admin)
Re: views.mdx click left mouse [Re: TECO] #268030 06/11/20 09:26 AM
Joined: Dec 2002
Posts: 4,841
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,841
Thanks for your bug report. This issue would need to be solved in the MDX addon itself. mIRC has no idea how external DLLs, etc. work.

Re: views.mdx click left mouse [Re: TECO] #268031 06/11/20 11:36 AM
Joined: Aug 2003
Posts: 284
P
Protopia Offline
Fjord artisan
Offline
Fjord artisan
P
Joined: Aug 2003
Posts: 284
Just to clarify Khaled's response in case it helps:

1. mIRC provides a defined interface to DLLs which is mIRC-specific. It is the responsibility of the DLL author to ensure that their DLL conforms to the mIRC interface. Whilst Khaled generally makes every effort to preserve backwards compatability, the change from mIRC 6 to mIRC 7 was a very large and significant one to implement UTF support, so it may have been a necessary consequence as part of that, or it may have been an unintended consequence at some point.

2. It is further complicated by the fact that MDX is a DLL in its own right, and views.mdx is called from MDX. I have been unable to find either of these in a google search. But it is possible that there are later versions of these than the ones you are using if you are able to find them. But if there is anyone interested enough in helping you with this, they will need copies of the DLLs / MDX files that you are using as well as all the scripts that use them.

3. Apparently your mdx.dll and views.mdx files worked with mIRC 6.34 and doesn't work with mIRC 7.63. So at some point in the 12 years between August 2008 and August 2020, somewhere in the literally thousands of small updates to the mIRC code in those 12 years, something changed, and as we might imagine, it is probably a bit difficult for Khaled to track down which of these thousands of changes might have caused this.

4. Between 6.34 and 7.63 there have been lots of enhancements to mIRC dialog functionality - so it may be possible to replicate the same functionality without use of MDX / Views.mdx.

5. Looking at the Change Log I can see that there are 21 references to "dll" in versions later than 6.34, so it is possible that this might give TECO a hint as to what may have caused the DLL to stop working, though none of these 21 references jump out at me as likely to cause backwards incompatibility.