mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#110217 05/02/05 03:12 PM
C
coleturner
coleturner
C
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 ?

#110218 05/02/05 06:36 PM
Joined: Feb 2004
Posts: 2,013
F
Hoopy frood
Offline
Hoopy frood
F
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 smile

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

#110219 05/02/05 06:47 PM
C
coleturner
coleturner
C
Thx, with $gettok($dde(mozilla,WWW_GetWindowInfo), 1, 34) i get what i want now smile

#110220 05/02/05 06:49 PM
Joined: Feb 2004
Posts: 2,013
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Feb 2004
Posts: 2,013
Great smile

#110221 05/02/05 11:43 PM
Joined: Jul 2003
Posts: 733
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jul 2003
Posts: 733
and also...

s/mozilla/firefox

(replace mozilla with firefox) and it works for that :P

#110222 06/02/05 12:02 AM
Joined: Feb 2004
Posts: 2,013
F
Hoopy frood
Offline
Hoopy frood
F
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 smile

#110223 06/02/05 02:27 PM
Joined: Aug 2004
Posts: 237
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
what would it be for ie? tried ie and iexplore but none of these works

#110224 06/02/05 02:40 PM
Joined: Feb 2004
Posts: 2,013
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Feb 2004
Posts: 2,013
$dde(iexplore,WWW_GetWindowInfo,1)

#110225 06/02/05 02:42 PM
Joined: Aug 2004
Posts: 237
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
thanks

#110226 06/02/05 05:23 PM
M
mIRCManiac
mIRCManiac
M
Quote:
$dde(iexplore,WWW_GetWindowInfo,1)


I can't seem to get that to work .. is there something I'm missing?

#110227 06/02/05 05:24 PM
Joined: Aug 2004
Posts: 237
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
try //echo : $dde(iexplore,WWW_GetWindowInfo,1) while a iexplorer window is opened, it should return something

#110228 06/02/05 05:27 PM
M
mIRCManiac
mIRCManiac
M
* /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.
#110229 06/02/05 05:33 PM
Joined: Aug 2004
Posts: 237
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
does "//echo : $url" return something?

#110230 06/02/05 05:35 PM
M
mIRCManiac
mIRCManiac
M

#110231 06/02/05 05:38 PM
Joined: Aug 2004
Posts: 237
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
i suppose thats what you're looking for

#110232 06/02/05 05:40 PM
M
mIRCManiac
mIRCManiac
M
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.
#110233 06/02/05 05:50 PM
Joined: Aug 2004
Posts: 237
L
Fjord artisan
Offline
Fjord artisan
L
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)

#110234 06/02/05 06:04 PM
M
mIRCManiac
mIRCManiac
M
ahhh gotcha .. k smile

#110235 06/02/05 06:11 PM
Joined: Aug 2004
Posts: 237
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
smile

#110236 06/02/05 06:18 PM
M
mIRCManiac
mIRCManiac
M
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.

Page 1 of 2 1 2

Link Copied to Clipboard