mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2006
Posts: 4,145
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
I'm trying to make modal @modal window with a parent @main.
Since there's no real modal @window, I'm trying to mimic it so when you activate @main, if @modal exist, I activate @modal:

Code
on *:active:*:{
echo -s $active -- $lactive
if ($active == @main) && ($window(@modal)) window -ao @modal
}
This fails, even with any kind of timer to delay the /window command.

When I activate @main, @modal is brought up to the front, and $active is set correctly but i can still access and trigger mouse events in @main, which is not desired.

For example, I click on @main's titlebar to move it, which activate it, I'm still able to move that window.

I believe that activating @modal in the script should make the action of moving @main impossible, I think I should have to reclick to move it (then retriggering the code, always getting @modal active as intended)

At the same time, even if this is not intended and get fixed, it would probably still register click when clicking inside the window to activate it, is it possible to create modal custom @window?


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
Quote
is it possible to create modal custom @window?

No, this is not possible. As for simulating it, even if you did find a way to make it work with on ACTIVE, it will likely break in a future version as it is not designed to work in this context. You will need to find another way to do this.


Link Copied to Clipboard