mIRC Home    About    Download    Register    News    Help

Print Thread
#244875 02/04/14 07:14 PM
Joined: Apr 2014
Posts: 5
I
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
I
Joined: Apr 2014
Posts: 5
Is there a way to select or define which browser to use when opening a link? I have Win 7 with Firefox as default browser but when I double click on a link it opens IE!

I'm using mirc 6.03 and 7.32 both as portable versions.


Saludos / Saluton
Iñaqui Sandí Suárez

Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
If you hit Win+R and type in a url, which browser opens?

Joined: Nov 2009
Posts: 295
P
Fjord artisan
Offline
Fjord artisan
P
Joined: Nov 2009
Posts: 295
I believe having mirc as portable might be part of the issue. I do have a script for opening links in any chosen browser which I'll post later.

http://scripting.pball.x10.mx/2011/06/21/browser-selector/

Follow directions there and ask questions if you have any

Last edited by pball; 02/04/14 10:11 PM.

http://scripting.pball.win
My personal site with some scripts I've released.
Joined: Apr 2014
Posts: 5
I
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
I
Joined: Apr 2014
Posts: 5
It opens Firefox Loki ..


Saludos / Saluton
Iñaqui Sandí Suárez

pball #244880 02/04/14 10:16 PM
Joined: Apr 2014
Posts: 5
I
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
I
Joined: Apr 2014
Posts: 5
Cool going to try and in any case will post questions.. Thanks pball


Saludos / Saluton
Iñaqui Sandí Suárez

pball #244881 02/04/14 10:51 PM
Joined: Apr 2014
Posts: 5
I
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
I
Joined: Apr 2014
Posts: 5
Originally Posted By: pball
I believe having mirc as portable might be part of the issue. I do have a script for opening links in any chosen browser which I'll post later.

http://scripting.pball.x10.mx/2011/06/21/browser-selector/

Follow directions there and ask questions if you have any


Have done it, loaded, set the path.. but I've noticed two things

1) Variable remains without value
2) Even when entering the value by hand, does the same opens IE, instead of other browser.

I'm trying to understand how it works to see if i could make it work... any consideration I should have due to the fact that is running as portable app?


Saludos / Saluton
Iñaqui Sandí Suárez

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I using this code.
Code:
on $^*:HOTLINK:/^\W*(((?:https?|ftps?):\/\/|www\.)\S+)\b/:*:return
on $*:HOTLINK:/^\W*(((?:https?|ftps?):\/\/|www\.)\S+)\b/:*:runmax firefox.exe -new-tab $regml(1)

And never failed me so far, easy to use, just paste the code in a remote file.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
Is this issue happening with mIRC v7.32?

Note: you should not under any circumstances be using any version of mIRC older than v6.35. mIRC v6.35 includes security updates that fix remote exploits existing in older versions of mIRC.

Joined: Nov 2009
Posts: 295
P
Fjord artisan
Offline
Fjord artisan
P
Joined: Nov 2009
Posts: 295
My script does the same as the short one someone else posted above, except it has more features. It just runs any time you click a link and forces it to open using the program you select. I'm not sure why it isn't working for you. I just loaded it up and it prompted me to select a file and I selected chrome. Then it opened links in chrome.

If you're trying it on that old mirc it might not work, I've never used a version that old so the script might not be compatible.


http://scripting.pball.win
My personal site with some scripts I've released.
Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
/runmax would actually fail for anyone not having that custom alias :p.

@Khaled: could you clarify whether or not a colon character inside a parameter of an event definition is problematic or not? (For Example on *:hotlink:http://*:*: but more like on $*:hotlink:/(http:\/\/.+)/:*: ) I remember testing this and iirc, on hotlink wouldn't suffer the problem, but others events would, now I think I also remember this simply works as long as the colon is inside a pair of (), but would be better if you could state how it really is smile

Unlikely but one way to get pball's code to fail is to get a filename with consecutives spaces, where $shortfn is safer than $qt()


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #244891 03/04/14 08:01 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Forgot about my runmax alias, sorry smile
Code:
alias runmax {
  if $os isin 9598me { var %a = command.com }
  else var %a = cmd.exe
  { run -n %a /c start "" /max $$1- }
}



if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Apr 2014
Posts: 5
I
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
I
Joined: Apr 2014
Posts: 5
Got the script working on 7.32 portable. I'm porting the full scripts I had from 6.0 to 7.32.

But without the script if I double click the url it opens IE, instead of the default browser defined...


Saludos / Saluton
Iñaqui Sandí Suárez

Joined: Dec 2014
Posts: 2
W
Bowl of petunias
Offline
Bowl of petunias
W
Joined: Dec 2014
Posts: 2
I would like to apologize if I am supposed to make a new thread instead of posting here.

In my IRC I am trying to do a similar thing, browser selection. At the moment it seems to work in Channels and Queries. It does not work in the server windows or in the URL list.
Any way I could get it to work with that?

The code I'm using is:
Code:
;on ^*:hotlink:*//*.*:*: { }
;on *:hotlink:*//*.*:*: { run "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory="Profile 1" -incognito $1 }
;on ^*:hotlink:*www.*:*: { }
;on *:hotlink:*www.*:*: { run "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory="Profile 1" -incognito $1 } 

Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
on hotlink doesn't work with listboxes.
The @url window already has options to run the url: you can double click or right click a line to get the options
What do you mean by 'server window'? On hotlink works for the status window (the main window for a connection).


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #249612 07/12/14 12:18 PM
Joined: Dec 2014
Posts: 2
W
Bowl of petunias
Offline
Bowl of petunias
W
Joined: Dec 2014
Posts: 2
http://puu.sh/dkAax/e14483067d.png
http://puu.sh/dkA9V/9dfa01059f.png

I don't see where I can choose my browser.

Also, I am not trying to just simply open the URL, I am trying to open it with incognito mode. ..and yeah I did mean status window you're right it does work there sorry about that mistake.

Last edited by whiteboo; 07/12/14 01:23 PM.
Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
Well yeah, forgot you actually wanted to use the non default browser there.
But rather than having an option for the @urls windows, I think mIRC should have a general options to specify which browser should be used.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard