|
Joined: Feb 2005
Posts: 4
Self-satisified door
|
OP
Self-satisified door
Joined: Feb 2005
Posts: 4 |
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,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
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
Gone.
|
|
|
|
Joined: Feb 2005
Posts: 4
Self-satisified door
|
OP
Self-satisified door
Joined: Feb 2005
Posts: 4 |
Thx, with $gettok($dde(mozilla,WWW_GetWindowInfo), 1, 34) i get what i want now
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
Great
Gone.
|
|
|
|
Joined: Jul 2003
Posts: 742
Hoopy frood
|
Hoopy frood
Joined: Jul 2003
Posts: 742 |
and also...
s/mozilla/firefox
(replace mozilla with firefox) and it works for that :P
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
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
Gone.
|
|
|
|
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,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
$dde(iexplore,WWW_GetWindowInfo,1)
Gone.
|
|
|
|
Joined: Aug 2004
Posts: 237
Fjord artisan
|
Fjord artisan
Joined: Aug 2004
Posts: 237 |
|
|
|
|
Joined: Feb 2005
Posts: 681
Fjord artisan
|
Fjord artisan
Joined: Feb 2005
Posts: 681 |
$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
|
|
|
|
Joined: Feb 2005
Posts: 681
Fjord artisan
|
Fjord artisan
Joined: Feb 2005
Posts: 681 |
* /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: Feb 2005
Posts: 681
Fjord artisan
|
Fjord artisan
Joined: Feb 2005
Posts: 681 |
|
|
|
|
Joined: Aug 2004
Posts: 237
Fjord artisan
|
Fjord artisan
Joined: Aug 2004
Posts: 237 |
i suppose thats what you're looking for
|
|
|
|
Joined: Feb 2005
Posts: 681
Fjord artisan
|
Fjord artisan
Joined: Feb 2005
Posts: 681 |
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)
|
|
|
|
Joined: Feb 2005
Posts: 681
Fjord artisan
|
Fjord artisan
Joined: Feb 2005
Posts: 681 |
ahhh gotcha .. k
|
|
|
|
Joined: Aug 2004
Posts: 237
Fjord artisan
|
Fjord artisan
Joined: Aug 2004
Posts: 237 |
|
|
|
|
Joined: Feb 2005
Posts: 681
Fjord artisan
|
Fjord artisan
Joined: Feb 2005
Posts: 681 |
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.
|
|
|
|
Joined: Aug 2004
Posts: 237
Fjord artisan
|
Fjord artisan
Joined: Aug 2004
Posts: 237 |
/help $dde: $dde(name, topic, item, delay)Returns the value returned by the specified service name, topic, and item, by sending an XTYP_REQUEST. //echo My other mIRC is $dde(mirc, connected) to $dde(mirc, server) The item and delay parameters are optional. The delay value indicates that you want $dde() to wait N seconds for a reply before giving up. The default is one second, which is usually enough. I don't completely understand it either, I suppose you need a delay higher than 1 to work @ your place; dunno why. L33t scripters, help!
|
|
|
|
Joined: Feb 2005
Posts: 681
Fjord artisan
|
Fjord artisan
Joined: Feb 2005
Posts: 681 |
Well I would assume that since both aren't specified in this case that this would be $dde(name, topic, item) and not $dde(name, topic, delay) .. am I wrong? It's not a question for you specifically, but for anyone that may be able to provide an answer.
- Edit - Yes I know about DDE in the help file, but ty for the reference anyway.
Last edited by mIRCManiac; 06/02/05 07:18 PM.
|
|
|
|
Joined: Dec 2002
Posts: 1,922
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,922 |
According to MSKB Q160957 the correct syntax would be $dde(iexplore, WWW_GetWindowInfo, WWW_GetWindowInfo)
|
|
|
|
Joined: Aug 2004
Posts: 237
Fjord artisan
|
Fjord artisan
Joined: Aug 2004
Posts: 237 |
According to MSKB Q160957 the correct syntax would be $dde(iexplore, WWW_GetWindowInfo, WWW_GetWindowInfo) Which doesn't work for me
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
Yeah, doesn't work for me either, with specifying a 1 it does. I think it's a bit dodgy to say the least. @Online: I got my documentation from there actually but had to do some testing since my signature applies well here.
Last edited by FiberOPtics; 07/02/05 12:24 AM.
Gone.
|
|
|
|
Joined: Aug 2006
Posts: 8
Nutrimatic drinks dispenser
|
Nutrimatic drinks dispenser
Joined: Aug 2006
Posts: 8 |
Since v6.17, $url works with Firefox. I really appreciate this fix. I haven't seen any mention of the change.
|
|
|
|
|