mIRC Home    About    Download    Register    News    Help

Print Thread
#203195 08/08/08 05:12 PM
Joined: May 2004
Posts: 24
K
kocam Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: May 2004
Posts: 24
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.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.

Joined: May 2004
Posts: 24
K
kocam Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: May 2004
Posts: 24
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..



Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.


Joined: May 2004
Posts: 24
K
kocam Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: May 2004
Posts: 24
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

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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?

Joined: May 2004
Posts: 24
K
kocam Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: May 2004
Posts: 24
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

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Then use my suggestion that includes the piped command. That will run when the timer is declared.


Link Copied to Clipboard