mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2005
Posts: 28
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Oct 2005
Posts: 28
Basically I want to keep a list of windows with related CID and network name information. In the past, I've had problems with extracting the correct CID. Depending on what window type, what OTHER CIDs are active, ect, I can sometimes get mixed results and get the wrong CID.

I want to have the flexibility to open a status window minimized so that it does not activate, but still be able to catch that event, and upon catching the event, be able to retrieve the CID for my scripts.

I know I can use timers, but I've done that before, and it uses WAY more cycles than I'd ever want.

I have a dll called "winevent.dll" that does a good job of telling me when a window is created or destroyed and gives me the Hwnd, but I don't know of any identifier that you can input the hwnd and retrieve window properties. Is there one?

Thanks to mIRC's scripting flexibility there are plenty of ways to work something out, but I want the most direct method that requires the least amount of code :P

So... any ideas?

Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
I don't think any idenfifiers accept hwnd as input, though there are a few that provide hwnd as output ($chan, $timer, $window, $dialog). You'd likely have to loop through (and store) each window's hwnd vs name/cid/etc values. I imagine you can figure out the code to store those values.

-genius_at_work

Joined: Oct 2005
Posts: 28
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Oct 2005
Posts: 28
yah I've already been thinking of ways to do that with minimal code.. I kinda figured that I'd get an answer like that. I'm contacting the guy who made winevent.dll, and hopefully he won't mind trying to include the CID as part of the output :P ... that would solve about 90% of all my scripting problems if he can do that.

Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
you could loop $window(*,N).hwnd to find the matching hwnd and its associated cid.


$maybe

Link Copied to Clipboard