mIRC Home    About    Download    Register    News    Help

Print Thread
$com, reading titlebar #206719 22/11/08 03:28 PM
Joined: Jun 2008
Posts: 58
P
Pivo Offline OP
Babel fish
OP Offline
Babel fish
P
Joined: Jun 2008
Posts: 58
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

Re: $com, reading titlebar [Re: Pivo] #206731 22/11/08 09:42 PM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
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.

Last edited by FiberOPtics; 22/11/08 09:58 PM.

Gone.
Re: $com, reading titlebar [Re: FiberOPtics] #206735 22/11/08 10:24 PM
Joined: Jun 2008
Posts: 58
P
Pivo Offline OP
Babel fish
OP Offline
Babel fish
P
Joined: Jun 2008
Posts: 58
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 ...