mIRC Homepage
Posted By: kocam About checkboxes in list - 08/08/08 05:12 PM
I wonder if it is possible to leftclick a line (and therefore select it) in a list of checkboxes without changing that line's checkbox state (from checked to unchecked, and viceversa) unless i specifically aim for the box.

Thanks

PS: I know it's possible to select a line without leftclicking.
Posted By: RusselB Re: About checkboxes in list - 08/08/08 11:11 PM
This can be scripted with something like
Code:
on *:dialog:dname:sclick:1:{
    did $iif($did(1,$did(1).csel).cstate,-u,-c) $dname 1 $did(1).csel
}
on *:dialog:dname:dclick:1:{
    did $iif($did(1,$did(1).csel).cstate,-c,-u) $dname 1 $did(1).csel
}

Note that this isn't perfect as doing the actual change requires a double click. Alternatively, right click (rclick event) could be an option to actually make the change.
Posted By: kocam Re: About checkboxes in list - 09/08/08 09:04 AM
Thanks RusselB.

I've already tried something similar before you posted (your code didnt work by the way):
Code:
on *:dialog:lol:sclick:1,2:{
  did $iif($did($did,$did($did).sel).cstate,-l,-s) $dname $did $did($did).sel
}

But with this code actually when the leftclick goes down the checkbox becomes checked and when the click is released it becomes unchecked again..


Posted By: RusselB Re: About checkboxes in list - 09/08/08 10:11 AM
I'm afraid that what you have is as close as you're going to get until Khaled releases a version where single clicking on an item in the list doesn't check/uncheck the item, unless the actual check box is clicked.
To my knowledge, this hasn't even been suggested in the Feature Suggestions forum, which is, I believe, where Khaled mainly looks for suggestions. The reason my code didn't work is because I got the switches for the regular checkboxes confused with the switches for the listbox checkboxes.

Your code, on the other hand, uses the correct switches.

Posted By: kocam Re: About checkboxes in list - 09/08/08 11:02 AM
Thanks again for your input, RusselB.

Maybe this is not the appropriate thread but i have 2 more question and i dont want to create 2 more topics:

1. What's the difference between extsel and multsel? (they both are styles for lists and they seem to do the same job.. i can't find nothing in the mIRC help about them)
2. Is it possible to make a timer execute its associate command when declared?
Example: timerex 0 10 echo -a stuff
this will echo stuff after 10 seconds unless i add an extra line with timerex -e
would be cool to do timerex -e 0 10 echo -a stuff

Maybe this should be suggested too?

Thanks
Posted By: RusselB Re: About checkboxes in list - 10/08/08 03:51 AM
Re: extsel & multsel, sorry, but I don't know.
Re: timer command, use /timerex 0 10 echo -a stuff | echo -a stuff

The echo after the pipe will run immediately

While I haven't tried it, in theory the timer command you suggested should work now. Did you try it?
Posted By: kocam Re: About checkboxes in list - 10/08/08 06:15 AM
Originally Posted By: RusselB
While I haven't tried it, in theory the timer command you suggested should work now. Did you try it?

Works, but not when the timer is declared;

Thanks for everything
Posted By: RusselB Re: About checkboxes in list - 10/08/08 09:05 AM
Then use my suggestion that includes the piped command. That will run when the timer is declared.
© mIRC Discussion Forums