mIRC Homepage
Posted By: Pivo $com, reading titlebar - 22/11/08 03:28 PM
Could someone give me an example of how to read the titlebar of a programm using mIRC?
For example, if I would try to read my Firefox-titlebar right now, mIRC would tell me "mIRC Discussion Forums: New Post - Mozilla Firefox".

I've been trying to manage that alone for some time, searching for references, but I only found this (which is probably the wrong one in this case) and that example refering to $com objects ...
But I was unable to understand, how that works frown

Thanks in advance
Posted By: FiberOPtics Re: $com, reading titlebar - 22/11/08 09:42 PM
Hey,

you can use following aliases:

Code:
; Usage:
;
; //echo -a > $Browser_URL(firefox)
; //echo -a > $Browser_Titlebar(firefox)
;
; To get info from Internet Explorer, use identifier "iexplore" without the quotes
;

alias Browser_URL return $gettok($dde($$1,www_getwindowinfo,1),1,34)
alias Browser_Titlebar return $gettok($dde($$1,www_getwindowinfo,1),3,34)


Both of these will return the info from the active tab. If you have multiple instances of the same browser open, it will return info from the firstly opened instance.
Posted By: Pivo Re: $com, reading titlebar - 22/11/08 10:24 PM
Thanks, but I was more an example than the request itself...
It's just to be able to read the titlebar of any running application...
Let's say, you're a lazy man, and you want a small "now playing" script for mIRC, reading the song winamp is currently playing...
But you don't like weird plugins or DLLs, just some little script code - so you could simply read the titlebar of winamp. (Just another example...)
Also, I'm trying to learn working with $com objects, but at the moment, I can't figure where to put what information ...
© mIRC Discussion Forums