twig / dcxdll

Dialog Control eXtensions for mIRC
BSD 3-Clause "New" or "Revised" License
23 stars 2 forks source link

Link - an additional parameter causes a crash error #66

Closed EpicNet closed 2 years ago

EpicNet commented 2 years ago

I am using "mIRC v7.67" + "DCX dll v3.1-git469" in system "Windows 8.1 x64".

When using the command "/xdid -q" if specify the 5th parameter in the form of RGB color or just a dash "-", then an crash error occurs after which the work of the mIRC client shutdown. It would be nice to reserve the 5th parameter for the color of the link, in which it should be colored when click on it with the mouse. Would like to see a fix for this problem. Thanks.


image

Here is a test piece of script to reproduce this the problem. To run the script click on "F5" or enter the command "/link_test":

alias F5 { link_test }
alias link_test {
  if ($dialog(link_test)) .dialog -x link_test | else { .dialog -m link_test link_test }
}
dialog link_test {
  title "Link test"
  icon $mircexe,0
  option pixels
  size -1 -1 280 130
}
on *:DIALOG:link_test:init:0:{
  .dcx Mark $dname link_test_work
  .xdialog -b $dname +ty
  .xdialog -g $dname +b $rgb(20,20,27)
  .xdialog -c $dname 1 link 70 35 140 20 notheme nounderline | link_decor $dname 1 12 https://google.com
  .xdialog -c $dname 2 link 70 55 140 20 notheme | link_decor $dname 2 0 https://mirc.com
  .xdialog -c $dname 3 link 70 75 140 20 notheme | link_decor $dname 3 18 http://epicnet.ru
}
alias -l link_decor {
  .xdid -x $1 $2 +
  .xdid -C $1 $2 +b $rgb(20,20,27)
  .xdid -q $1 $2 $rgb(45,123,253) $rgb(5,203,245) $rgb(45,123,253) $rgb(150,150,150) -
  .xdid -f $1 $2 + ansi 10 Comic Sans MS
  .xdid -w $1 $2 + $3 $mircexe
  .xdid -t $1 $2 $4
}
alias link_test_work {}
OokEek commented 2 years ago

This should be fixed now.