mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
Joined: Aug 2005
Posts: 12
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Aug 2005
Posts: 12
Hi Everyone,

Quite a novice here, I have worked out how to add webpage links to the right click within mirc, that works fine when calling to a webpage as it opens in a new window outside of mirc. What i`m trying to achieve is when you right click and select the webpage link, is for it to open up within a window in mirc, so eg you can tile it, view the page when typing to a channel etc. is there anyway to do this? if so is there a guide i can follow?? or is someone able to give me an idiot proof way of doing this lol...

thanks in advance

Joined: Mar 2004
Posts: 359
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Mar 2004
Posts: 359

Joined: Aug 2005
Posts: 12
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Aug 2005
Posts: 12
thanks for the quick responce, though it does not seem to be what I want, both of them allow you to use like an address bar, what I want is the actual page to open in a window, like having 2 chatrooms open, but this being 1 for chat and one for website...

this is what I am aiming for:-

Last edited by lanandson; 13/08/05 08:32 PM.
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Follow these steps:
  1. Download nHTMLn here .
  2. Create a folder named "nhtmln" in your main mIRC folder.
  3. Extract the zip file to that new folder.
  4. Open mIRC, open the Scripts Editor, go to tab "Remote", go to "File -> New", and paste the code beneath in there. Make sure it looks just like in this post.
  5. Close the editor by pressing ok.

What does it do?

When you hold shift, whilst double clicking on an url, it will open the url in a window in mIRC, named @browser.

If you don't hold shift, then the default action will happen, which is the url will be opened in your default browser.

If you wish to change the location of the dll, then you will need to adjust it in the code, as the alias nhtmln there as you can see, points to the path: $mircdir\nhtmln\nHTMLn_2.95.dll

Code:
on $^*:hotlink:/^(?:www\d*\.\S+\.\S+|https?\72\/\/\S+)$/:*:{
  if ($mouse.key == 5) return 
  halt
}
 [color:red]  [/color] 
on *:hotlink:*:*: navigate $1
 [color:red]  [/color] 
alias nhtmln return $shortfn($mircdir\nhtmln\nHTMLn_2.95.dll)
 [color:red]  [/color] 
alias navigate {
  if (!$window(@browser)) {
    window @browser 
    if ($dll($nhtmln,attach,$window(@browser).hwnd) != S_OK) {
      echo -ac info * /navigate: error attaching browser window
      close -@ @browser
      return
    }
  }
  window -a @browser
  return $dll($nhtmln,navigate,$1)
}


Gone.
Joined: Aug 2005
Posts: 12
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Aug 2005
Posts: 12
done that, didn`t work...... still opens up in a IE win outside of irc.. any ideas?

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
It works fine if you use it correctly.

Like I stated, you need to hold shift whilst double clicking, in order for it to work. If you do not hold shift whilst double clicking, then it will do the default action, which is indeed creating it outside the mIRC window.


Gone.
Joined: Aug 2005
Posts: 12
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Aug 2005
Posts: 12
nope with the shift down doesn`t work....... had someone else install it too.... the path of the main mirc dir, my install didn`t goto c:\mirc would that be an issue?

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
What mIRC version are you using?

Where is your main mIRC folder installed?

Did you create the nhtmln directory in that main mirc folder, and extract the files there?

Do you get any error messages in mIRC when you hold shift and double click an url?

Did you change anything to the code?

Did you paste the code in the editor correctly, in the same way that it shows on the forum?

Did you paste it in a new remote file like I said?

No it doesn't matter where you installed mIRC, in the alias nhtmln I used $shortfn so that filepaths with spaces would not form a problem.

Btw, in your mIRC type //echo -a $nhtmln and tell me what it said.


Gone.
Joined: Aug 2005
Posts: 12
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Aug 2005
Posts: 12
my mirc is 6.03 and installed into c:\program files\chat

the nhtmln folder was created in c:\program files\chat\nhtmln\ within that are 2 files and a dir

no to the error messages, just opens up in an ie win and not in mirc

code copied and pasted as you placed in earlier and pasted into a new remote file which called itself script1.ini

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Quote:

29/08/2003 - mIRC v6.1

123.The matchtext section of a remote event definition can now
contain a regular expression. You must specify the $ event prefix
to use this feature.

on $*:TEXT:m/regular expression/switches:#:/echo message: $1-

The 'm' and switches are optional. The // are required. If
switches are used they must be standard PCRE switches, otherwise
the match will fail. You can use switch 'S' to strip control
codes from $1-.

You need mIRC 6.1 for it to work.

There was a fix for these kind of regexes in event definitions, so if it's buggy then you'll need mIRC 6.15.


If you do not wish to upgrade, then you can replace the first on hotlink event with this one:

Code:
on ^*:hotlink:*:*:{
  if ($mouse.key == 5) && ($regex($1,/^(?:www\d*\.\S+\.\S+|https?\72\/\/\S+)$/)) return 
  halt
}




Gone.
Joined: Aug 2005
Posts: 12
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Aug 2005
Posts: 12
sorry for being stupid here, that means nothing to me

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
What?

I cannot believe this, how easy can it get? Not only did I make the code for you, I gave you step by step instructions, and now that we know your mIRC version is not sufficient, I even gave you a replacement for the first on hotlink.

I can't help you further.


Gone.
Joined: Aug 2005
Posts: 12
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Aug 2005
Posts: 12
i fully appreciate your help, i really do, but i cant see anywhere regarding being above 6.1.... i`ll upgrade mine here to see if it works.... I dont doubt your code and your efforts are really appreciated

Joined: Aug 2005
Posts: 12
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Aug 2005
Posts: 12
sorry for being thick, I changed the version of mirc, and redone the above cosing of yours, i get an error now:-

* $dll: unable to open 'C:\mirc\\nhtmln\nHTMLn_2.95.dll' (line 13, script1.ini)

though the @browser win opened up in mirc

Last edited by lanandson; 13/08/05 11:28 PM.
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Never mind, it's because you had the wrong file installed.

Last edited by FiberOPtics; 13/08/05 11:41 PM.

Gone.
Joined: Aug 2005
Posts: 12
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Aug 2005
Posts: 12
ok thats changed, I had version 2.9 and not 2.95, so thats changed also.

nearlly there, lol, i bet ya pulling ya hair out, window opens within mirc, no errors, but no page, just blank

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Erm, weird, the link I gave you was supposed to be a direct download link, but now that I try it, it redirects to the main page.

It's this link, and indeed, you needed the correct version, because the alias nhtmln references that exact DLL, it could not have worked on any other DLL.

If you are on mIRC 6.16, use my original code, then close the @browser window, and then hold shift and double click on an url it should do its job.

Btw I see now why you had that issue with the filepath, it wasn't due to the backslash, but simply cuz you had the wrong file in it. You can still remove the backslash if you want though, as it's more correct, though it shouldn't matter.


Gone.
Joined: Aug 2005
Posts: 12
L
Pikka bird
OP Offline
Pikka bird
L
Joined: Aug 2005
Posts: 12
I have added 2.95 now and all is working

thankyou so much for your patience and time, much appreciated

Joined: Aug 2005
Posts: 3
B
Self-satisified door
Offline
Self-satisified door
B
Joined: Aug 2005
Posts: 3
Hi, I have been watching this post with interest and have followed the instructions and find it works great but my question is..... is there anyway to set size of the browser window it opens?

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Certainly, you can do a lot with it, since the browser is embedded in a regular custom window, which you can manipulate with the /window command.

For example, if you do: //window -d +L @browser 100 80 500 300

it will create it at the following coordinates:

x = 100
y = 80
w(idth) = 500
h(eight) = 300

I use the first d flag, to make the window a desktop window, and the second L flag, to hide the button from the taskbar. Of course, it's all customizable, take a look in the help file /help /window.

You are to replace the line in the alias navigate that says "window @browser" with your own version.


Gone.
Page 1 of 2 1 2

Link Copied to Clipboard