mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Hello,

I am trying to access the $url from Microsoft Edge in Windows 10 but the results are $null, probably the $url is not yet compatitable with that new microsoft's browser so i report it as bug and not as feature in case that it should work in MS Edge because it's an Core-Included in Microsoft's 10 OS.

MS Edge Version: 25.10586.0.0
MS Edge HTML Version: 13.10586

- Thanks!


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Sep 2005
Posts: 116
Vogon poet
Offline
Vogon poet
Joined: Sep 2005
Posts: 116
$url is for mIRC addresses (ATL+U). Maybe you mean /url.

I can confirm. Did not work.

Regards.

Last edited by deVilbaT; 09/03/16 10:24 AM.

when no one watching us
we are invisible
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Read the help file (/help $url)

It says:

$url
Returns the currently active URL in your Web Browser.


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Dec 2002
Posts: 5,427
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,427
Thanks for your bug report. It looks like Microsoft Edge does not support DDE, which means that the standard method of using WWW_GetWindowInfo via DDE will not work.

Unfortunately, there does not seem to be another method of retrieving the URL from Microsoft Edge (or Google Chrome), other than a hack that requires searching for window class names (which can change over time) of browsers, using the AccessibleObjectFromWindow() API to iterate through thousands of child objects while performing a regular expression match on returned values to find an item that looks like a URL in the hope (since it is not guaranteed) that it is the active URL. To make matters more complicated, Edge and Chrome do not include http:// or https:// in the result, so there is no way to retrieve that. This method does not sound very reliable.

Joined: Dec 2002
Posts: 5,427
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,427
After experimenting with the method I mentioned in the previous post, I have decided to include it in the next version. It is not perfect and will break if a browser changes its class name or the method it uses to store data in accessible objects. However, for the time being, it makes $url usable with most browsers in most situations. This change will be in the next version.

Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
I try to use the $url when the MS Edge is the active browser using the new build 1808 but mIRC stucks and not responding in result of crash.

Also when i have Firefox and MS Edge open and the active is MS Edge the $url still catching the Firefox and not the currently active browser.

Video: http://goo.gl/8RLzsX

Last edited by westor; 15/03/16 12:42 PM.

Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Dec 2002
Posts: 5,427
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,427
Thanks for your feedback. If you leave it running, does mIRC eventually become available? Or does it remain frozen permanently?

Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
It becomes available.

I use this to test the seconds:

Code:
//var %t = $ticks | var %u = $url | echo -a is %u -> $calc(($ticks - %t) / 1000)


Results: is -> 30.75

Some times the took time is about 0.852ms but $url is always $null.


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Dec 2002
Posts: 5,427
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,427
Thanks, the issue appears to be with the regex pattern I am using. I originally tested the new $url with the newer regex routines which were updated to fix a number of regex bugs. However, they were reverted to v7.43 in the latest beta as they broke backwards compatibility. I will be using a simpler regex URL for the new $url that will be in the next beta.

That said, what you are experiencing is a worst case scenario for the new $url method. Accessibility objects can number in the thousands which means that if mIRC does not detect a URL early on in the search, it will need to search through all objects. Unfortunately, there does not seem to be an alternative method of retrieving a URL from a modern browser.

Joined: Nov 2004
Posts: 842
Hoopy frood
Offline
Hoopy frood
Joined: Nov 2004
Posts: 842
$url doesn't work with Pale Moon (Firefox fork), either.


What do you do at the end of the world? Are you busy? Will you save us?
Joined: Dec 2002
Posts: 5,427
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,427
The new $url method has only been designed to work with the most widely used browsers. $url still attempts to use DDE initially, which is a standard method and works with all browsers that support it. Unfortunately, if a browser does not support DDE, it will not be possible to make it work with every different fork or flavour of browser.


Link Copied to Clipboard