mIRC Home    About    Download    Register    News    Help

Print Thread
#268016 03/11/20 04:49 PM
Joined: Jul 2014
Posts: 308
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 308
Code
dialog awaypager {
  title "Away pager"
  size -1 -1 396 244
  list 1, 12 18 138 214, size
}
on *:dialog:awaypager:*:*:{
  if ($devent == init) {
    mdx SetControlMDX $dname 1 TreeView nohscroll haslines hasbuttons showsel > $mdx.file(views)
  }
  elseif ($devent == sclick) {
    if ($did == 1) {
      tokenize 32 $did($did,1)
      if ($1 == sclick) { echo -s true }
   }
}


I have a problem and I am unable to find the solution. I want the actions to be taken with the left mouse button, but the code only works with the right button.
I've tried ($1 == slclick) and ($1 == sclick), but it only works with ($1 == rclick)

I'm going crazy loooolll


TECO
irc.PTirc.org (Co-Admin)
Joined: Jan 2012
Posts: 299
Fjord artisan
Offline
Fjord artisan
Joined: Jan 2012
Posts: 299
The most interesting thing is that this does not work even with normal dialog creation.
I decided to localize the reason and created a code like this, to check by running the alias "dtest":
Code
alias dtest { .dialog -md dtest dtest }
dialog dtest {
  title "dtest"
  size -1 -1 300 300
  option pixels
  list 1, 20 20 150 200
}
on *:DIALOG:dtest:sclick:1: .echo -a test: $devent

But this is doesn't work! Echo is silent. Although the reference book says that the "List" control element can work with the "sclick" and "dclick" events. Perhaps the root cause lies in this Bug.


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Joined: Jul 2014
Posts: 308
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 308
I use the views.mdx file in the rest of the code and I need someone who can help and I identify where the code problem is just accepting the right mouse key and not assuming the left key.

I'm pretty sure the problem is here, but I'm not sure:
mdx SetControlMDX $dname 1 TreeView nohscroll haslines hasbuttons showsel > $mdx.file(views)

Last edited by TECO; 03/11/20 10:10 PM.

TECO
irc.PTirc.org (Co-Admin)
Joined: Jan 2012
Posts: 299
Fjord artisan
Offline
Fjord artisan
Joined: Jan 2012
Posts: 299
I tried changing the control to "ListView":
Code
mdx SetControlMDX $dname 1 ListView noscroll > $mircdir $+ mdx\views.mdx

And I started getting an echo response from a left mouse click "sclick", and also this answer i get from right mouse button.

I flipped through the reference book for MDX and perhaps in order for the left mouse button to become active in "TreeView" control, you need to create some lines with text and control elements, so that this field is not empty.

slclick = The user has selected an item. That is, according to the guide, this should work as soon as some element is selected. Maybe this will solve your problem in code.



🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Joined: Jul 2014
Posts: 308
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 308
the problem is that the slclick condition is not working.


TECO
irc.PTirc.org (Co-Admin)
Joined: Jan 2012
Posts: 299
Fjord artisan
Offline
Fjord artisan
Joined: Jan 2012
Posts: 299
The latest beta version of "MDX v0.91.2" was edit in 2010 year. I could not find the source code for this DLL anywhere on the Internet. Therefore, there is practically no chance that someone will ever fix all the errors found. All that remains is to write an email to the DLL author (DragonZap) in the hope that he will answer and want to solve all the problems that have arisen.

Fortunately, there is a wonderful and, in my opinion, a better alternative to this.
I have been using DCX in my scripts for a long time, and there you can do all the same, only there are much more functions for working with dialog boxes than in MDX.
The latest version found on the Internet "mIRC DCX v3.1 git 222" for 2017 year. Try looking into this and write your script using this DLL. With this, you can do many amazing things in the mIRC client.
Perhaps an error like this will not appear there and you will succeed. If you try, then write to me here, because I will also be interested to know the result cool

P.S. It would be great if friend Khaled would officially implement a lot of this DLL for the mIRC client's more powerful editing capabilities, so that all our fantastic ideas in terms of functionality and design of the in a programme mIRC could be brought to life.


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Joined: Jul 2014
Posts: 308
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 308
I understand what you mean, the problem is that I don't feel comfortable with programming in DCX.

This is the MDX Code that I would have to convert to DCX but I'm not seeing how to do it.


TECO
irc.PTirc.org (Co-Admin)
Joined: Jan 2012
Posts: 299
Fjord artisan
Offline
Fjord artisan
Joined: Jan 2012
Posts: 299
I would recommend that you switch to this DLL to avoid delaying your project creation due to an unrecoverable error. Unfortunately, for this you have to write new code analogous to yours from scratch.
There is a good in HTML reference book for DCX. You can find his it on the internet. The latest version is desirable, or at least for DLL v1.4.1 and higher. The difference is in some fixes and command changes.
Taking advantage of free time and with a little diligence, you can easily learn how to write code using this DLL and then it will bring the fruits.


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples

Link Copied to Clipboard