forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Capturing URL and Title from Browsers - Need help

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
marty
Professional Member
Professional Member


Joined: 10 May 2001
Posts: 789

PostPosted: Wed Jan 19, 2005 3:02 am    Post subject: Capturing URL and Title from Browsers - Need help Reply with quote

Ok, I found a way to capture the URL and Title of an opened window of IE or FireFox.. Now that works using DDE, but someone would have an idea on how to make this work for multiple IE/FireFox opened windows and when new ones appear?

Here is what I have so far:

Code:
DIALOG CREATE,GetUrl,-1,0,0,0,NOTITLE
dialog show

# Get IE URL and Title
  DDE LINK,IExplore,WWW_GetWindowInfo
  if @not(@OK())
    warn Unable to establish DDE link@CR()with IE
    exit
  end
  %%rq = "0xFFFFFFFF,sURL,sTitle"
  %%info = @ddeitem(%%rq)
  info %%info
  DDE TERMINATE
#Get Firefox URL and Title
    DDE LINK,FireFox,WWW_GetWindowInfo
  if @not(@OK())
    warn Unable to establish DDE link@CR()with Firefox
    exit
  end
  %%rq = "0xFFFFFFFF,sURL,sTitle"
  %%info = @ddeitem(%%rq)
  info %%info
  DDE TERMINATE
  exit


Thanks... Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Wed Jan 19, 2005 8:07 am    Post subject: Reply with quote

i have written a program that keeps track of the title bar of msie, opera, netscape and firefox

the way i do it is to keep track of all the windows opened and see if the title bar contains the keyword relevant for each browser

if it does then i keep track of that particular window using its identifier which is in the form of %23454

same thing with tabs - when a user changes tabs, the title bar changes and this is recorded

i am not as fancy as you as i used the trusted command @WINACTIVE as it gives me the window identifier and title bar

hope this helps

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
marty
Professional Member
Professional Member


Joined: 10 May 2001
Posts: 789

PostPosted: Wed Jan 19, 2005 2:12 pm    Post subject: Reply with quote

Thanks Serge, good suggestions Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Wed Jan 19, 2005 2:19 pm    Post subject: Reply with quote

Wink
_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Boo
Valued Contributor
Valued Contributor


Joined: 31 Oct 2003
Posts: 599
Location: Gulf Breeze, Florida USA

PostPosted: Wed Jan 19, 2005 3:39 pm    Post subject: Reply with quote

Awesome information, Marty! Thanks so much for posting this. Cool

Just an FYI... Your code also works with Opera and Netscape using the following:

[Opera 7.54]. Tested; works:
Code:
DDE LINK,Opera,WWW_GetWindowInfo

Not sure about previous versions of Opera, but probably works.

[Netscape 6] - Tested; works:

Code:
DDE LINK,Netscape6,WWW_GetWindowInfo


[Earlier versions of Netscape?] - Have not tested... I think Netscape 6 uses different conventions than previous versions, but the following probably works for earlier versions:

Code:
DDE LINK,Netscape,WWW_GetWindowInfo


Finally, you may want to check out the following page for some useful tidbits:

http://www.angelfire.com/biz/rhaminisys/ddeapps.html

From the aforementioned page (regarding IE):

Multible Browser Instances - Each instance of Internet Explorer registers itself as a DDE server. To distinguish between them a client using DDEML can connect with the instance specific service name handle. If this is not done, it is pot luck which instance will establish a conversation with a client. If you open a file by double clicking it you cannot control which instance of IE will open it. Instance specific handles are transient and cannot be held in the Registry.

Cheers,

- Boo
Back to top
View user's profile Send private message
marty
Professional Member
Professional Member


Joined: 10 May 2001
Posts: 789

PostPosted: Thu Jan 20, 2005 3:42 am    Post subject: Reply with quote

Thanks Boo Smile And happy to hear you like this tip Wink
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group