|
coleturner
|
coleturner
|
Hi, my standard browser is Mozilla (Suite) and $url doesn't work. It worked fine with IE and Opera, but since i use Mozilla $url doesn't return the active URL any more.
Is there any way to fix this ? Or is there another way to make my script display the current active URL in the channel than $url ?
|
|
|
|
Joined: Feb 2004
Posts: 2,013
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,013 |
You could use dde to get the currently active url, in other words the url from the active tab. Note that this only works in a single instance of Mozilla. Fex if you open mozilla, and are browsing. And then you run another instance of Mozilla, the dde will not get info from this second instance, only from the first. But tabbed browsing is there for a reason, so there should be no need to open up multiple instances alias geturl return $dde(mozilla,WWW_GetWindowInfo) This returns a string like this fex: "http://www.winamp.com/","WINAMP.COM | Winamp.com: Media Player, Skins, Music Videos, Songs","" The first part is the URL, the second part a description, and the third part is $null. To get just the url, you'd do: $gettok($geturl,1,34) Hope you find this useful, Greets
|
|
|
|
coleturner
|
coleturner
|
Thx, with $gettok($dde(mozilla,WWW_GetWindowInfo), 1, 34) i get what i want now 
|
|
|
|
Joined: Feb 2004
Posts: 2,013
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,013 |
Great 
|
|
|
|
Joined: Jul 2003
Posts: 733
Hoopy frood
|
Hoopy frood
Joined: Jul 2003
Posts: 733 |
and also...
s/mozilla/firefox
(replace mozilla with firefox) and it works for that :P
|
|
|
|
Joined: Feb 2004
Posts: 2,013
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,013 |
Not only firefox, it works for many browsers like Netscape, IE, Opera etc. though the original requester said Mozilla suite, so that's what I gave him 
|
|
|
|
Joined: Aug 2004
Posts: 237
Fjord artisan
|
Fjord artisan
Joined: Aug 2004
Posts: 237 |
what would it be for ie? tried ie and iexplore but none of these works
|
|
|
|
Joined: Feb 2004
Posts: 2,013
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,013 |
$dde(iexplore,WWW_GetWindowInfo,1)
|
|
|
|
Joined: Aug 2004
Posts: 237
Fjord artisan
|
Fjord artisan
Joined: Aug 2004
Posts: 237 |
|
|
|
|
mIRCManiac
|
mIRCManiac
|
$dde(iexplore,WWW_GetWindowInfo,1) I can't seem to get that to work .. is there something I'm missing?
|
|
|
|
Joined: Aug 2004
Posts: 237
Fjord artisan
|
Fjord artisan
Joined: Aug 2004
Posts: 237 |
try //echo : $dde(iexplore,WWW_GetWindowInfo,1) while a iexplorer window is opened, it should return something
|
|
|
|
mIRCManiac
|
mIRCManiac
|
* /echo: insufficient parameters
That's what I get & I have 3 browser windows open currently. Is there an IE setting that maybe needs to be enabled or something?
- Edit - btw, using v6.16 on WinXP Pro SP2
Last edited by mIRCManiac; 06/02/05 05:32 PM.
|
|
|
|
Joined: Aug 2004
Posts: 237
Fjord artisan
|
Fjord artisan
Joined: Aug 2004
Posts: 237 |
does "//echo : $url" return something?
|
|
|
|
Joined: Aug 2004
Posts: 237
Fjord artisan
|
Fjord artisan
Joined: Aug 2004
Posts: 237 |
i suppose thats what you're looking for
|
|
|
|
mIRCManiac
|
mIRCManiac
|
lol ok .. well yeah but it will drive me nuts that I can't get the other to work, and I'm sure it's for some stupid little reason on my end since it seems to work for you guys.
- edit - In your first post on this thread you said you had tried ie and iexplore and neither worked, in his reply he used iexplore and you said thanks .. so you tried iexplore again and it worked the second time or what?
Last edited by mIRCManiac; 06/02/05 05:44 PM.
|
|
|
|
Joined: Aug 2004
Posts: 237
Fjord artisan
|
Fjord artisan
Joined: Aug 2004
Posts: 237 |
a ",1" was added to the code first there was: $dde(iexplore,WWW_GetWindowInfo) but it had to be: $dde(iexplore,WWW_GetWindowInfo,1)
|
|
|
|
mIRCManiac
|
mIRCManiac
|
ahhh gotcha .. k 
|
|
|
|
Joined: Aug 2004
Posts: 237
Fjord artisan
|
Fjord artisan
Joined: Aug 2004
Posts: 237 |
|
|
|
|
mIRCManiac
|
mIRCManiac
|
Ok .. I got it to work, but not with the number 1
Now having 4 browser windows open, these are what worked .. $dde(iexplore,WWW_GetWindowInfo,3) $dde(iexplore,WWW_GetWindowInfo,4) $dde(iexplore,WWW_GetWindowInfo,19) $dde(iexplore,WWW_GetWindowInfo,20)
What's up with that, I assumed 1 would return the first window, 2 would return second window and so on, is each window assigned an ID or something like CID in mIRC? Weird.
|
|
|
|
|