mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
Joined: Jun 2010
Posts: 7
S
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
S
Joined: Jun 2010
Posts: 7
Code:
on ^*:HOTLINK:www.*:*:{
}
on ^*:HOTLINK:$(http $+ $chr(58) $+ *):*:{
}
on ^*:HOTLINK:$(ftp $+ $chr(58) $+ *):*:{
}

on *:HOTLINK:*:*:{
run "C:\Program Files\Mozilla Firefox\firefox.exe" $1
}


Thanks for this! Starting to use my FireFox and mIRC in Portable-Mode and this becomes now very handy!

/cheers


PS: There should be a Feature in the Portable-Version, to select a Portable-Browser ;-)

Joined: Feb 2006
Posts: 546
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
wow, old topic :P in case anyone's interested, and since i already had something similar lying around, here's a version of that snippet that more accurately reflects mIRC's own detection of URLs:

Code:
on ^*:hotlink:*:*:{
  if ($mouse.key !& 1) || (!$regex(url, $1, $urlre)) halt
}

on *:hotlink:*:*:{
  run "C:\Program Files\Mozilla Firefox\firefox.exe" $regml(url, 1)
}

alias urlre {
  return /(*UTF8) (?:^|[\ \x09]) [\Q '<([{" \E]* \K (                          $&
    (?: (?: (?# irc|gopher|telnet| ) https?|ftps?):// 	| (?:www|ftp)\. )      $&
    [^\ \x09]+\.[^\ \x09]+? ) (?= [\Q ')]}>"., \E]* (?:[\ \x09]|$) ) /giSx
}


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
If firefox is the default browser you don't need to specify the path on windows vista/7, not sure whether you do on earlier versions.

It looks like the system takes into account the default browser as well as any directories specified by %PATH% when trying to run a file with no path specified now.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
True, but the request that resurrected this topic was for when FF is in portable mode (not default).


Invision Support
#Invision on irc.irchighway.net
Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
Not to get off subject BUT, jaytea, what does the (?# ... ) in your regex do?


I am SReject
My Stuff
Joined: Feb 2006
Posts: 546
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
mentioned on IRC but i'll re-iterate here: (?# ... ) is a comment in regex. i used it to comment out certain protocols that, while supported as a part of URLs by mIRC, should not be opened by a browser.


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
Page 2 of 2 1 2

Link Copied to Clipboard