mIRC Home    About    Download    Register    News    Help

Print Thread
J
Jezebel
Jezebel
J
Hi, i was wondering if there's an .dll file that can return the active program running (Or the .exe file which is running).

So, for instance, if I'm busy working with notepad (mIRC running on background) and something in mirc is triggered, that the dll returns 'Notepad' or 'Notepad.exe'

If it doesn't exist, can anyone with much spare time create one? I'd really appriciate (I would do it myself, except i don't know n e thing bout such things).

G
GrimZ
GrimZ
G
I'm sure it's very possible .. but I've lost my MSDN help files and I'm too lazy to search msdn online.

I'm also pretty sure Necroman (or someone else if he doesn't before hand) will post a reply to how to make it. ;-)

N
Necroman
Necroman
N
You can call the GetForegroundWindow() function, which will return the handle to the window the user is working with. You can get certain information from its title using GetWindowText().

Next thing, you can call GetWindowLong() specifying GWL_HINSTANCE to obtain the handle to the application that created the window. GetModuleFileName() obtains the name of the executable.

J
Jezebel
Jezebel
J
Yea, thnx, but mIRC doesn't know those commands, i still need a .dll file with does options wink

G
GrimZ
GrimZ
G
For such a task that's highly unlikely to be needed by multiple people I doubt you'll find one. Your best bet is to learn C/C++/Delphi and make your own DLL to do it.

H
heyman
heyman
H
If you could give some more informations on the DLL you want (if there is some specific command, names, retrun text, style , function, stuff like that) I could do it for you, it don't seem to be an hard thing...



Joined: Jan 2003
Posts: 1,057
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,057
uhmmm if I am correct about what you are trying to do:

mIRC has an identifyer to check if it's the active application... so you don't need a dll

search the /help for it!

N
Necroman
Necroman
N
No, you're not correct.

Joined: Jan 2003
Posts: 1,057
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,057
?

on 1:APPACTIVE:echo mIRC active status: $appactive

The above event triggers whenever mIRC's active status has changed. The $appactive identifier returns $true if mIRC is active, or $false if it isn't.


?

Joined: Dec 2002
Posts: 1,893
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,893
That's true, although the person who wrote this post wanted to know the name of the active application, which can't be retrieved using a mIRC command.


Link Copied to Clipboard