mIRC Home    About    Download    Register    News    Help

Print Thread
#135301 10/11/05 03:17 AM
Joined: Oct 2003
Posts: 143
D
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
Hello all long time no post.

Well This question isnt so much of an mIRC question but its mainly to do with the irc:// link protocol. Iv been working with protocols for about 3 days trying to figure out how to make one. Well I figured it out but im running into 2 small issues that I cant get around. So I come here to ask you guys since irc:// is the only one that I could think of off hand.

First problem im having is files that run with my program. For example I have a .dat file that must be run with my exe. When I write up a fast program in VB6 and have it make the protocol in registry and I type test:// in the web browser I get a "could not find test.dat file" I dont know how to include this file or the whole folder in which the program is in stalled in.

second problem im having is commands after the protocol. For example I want the exe to run and connect to localhost on port 1234. So I would type this in <a href="test://127.0.0.1:1234" target="_blank">test://127.0.0.1:1234</a> but as you probly already guessed it I dont have the %1 command in the registry and I dont know how exactly to do it.

I noticed mIRC has commands (IE. <a href="irc://serverblabla.com/help)" target="_blank">irc://serverblabla.com/help)</a> would open mIRC connect you to the server and auto join help channel. This is what im tyring to get at.

Anyway anyone know how I can go about fixing these 2 small bugs? I know this isnt a VB6 board but if people would like to see source I would be more then happy to send it to you via e-mail for help.


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
#135302 11/11/05 03:30 PM
Joined: Oct 2004
Posts: 73
M
Babel fish
Offline
Babel fish
M
Joined: Oct 2004
Posts: 73
Not sure if this helps but it's what I use for getting mIRC to handle the telnet: protocol

Code:
on 1:LOAD:if ($os == XP) &amp;&amp; ($input(Do you want this addon to run when you click on telnet links in your browser?,yvqd,Telnet v1.0 loaded - usage: /telnet ) == $yes) urlhandler
alias -l urlhandler {
  write -c telnet.reg Windows Registry Editor Version 5.00
  write -i telnet.reg 
  write telnet.reg [HKEY_CLASSES_ROOT\telnet]
  write telnet.reg @="URL:Telnet Protocol"
  write telnet.reg "EditFlags"=dword:00000002
  write telnet.reg "URL Protocol"=""
  write telnet.reg "BrowserFlags"=dword:00000008
  write -i telnet.reg 
  write telnet.reg [HKEY_CLASSES_ROOT\telnet\DefaultIcon]
  write telnet.reg @=" $+ $replace($mircexe,\,\\) $+ ,0"
  write -i telnet.reg 
  write telnet.reg [HKEY_CLASSES_ROOT\telnet\shell]
  write telnet.reg @="&amp;connect"
  write -i telnet.reg 
  write telnet.reg [HKEY_CLASSES_ROOT\telnet\shell\&amp;connect]
  write telnet.reg @="connect"
  write -i telnet.reg 
  write telnet.reg [HKEY_CLASSES_ROOT\telnet\shell\&amp;connect\command]
  write telnet.reg @="\" $+ $replace($mircexe,\,\\) $+ \" -noconnect"
  write -i telnet.reg 
  write telnet.reg [HKEY_CLASSES_ROOT\telnet\shell\&amp;connect\ddeexec]
  write telnet.reg @="/telnet $chr(37) $+ l"
  write -i telnet.reg 
  write telnet.reg [HKEY_CLASSES_ROOT\telnet\shell\&amp;connect\ddeexec\Application]
  write telnet.reg @="mIRC"
  write -i telnet.reg 
  write telnet.reg [HKEY_CLASSES_ROOT\telnet\shell\&amp;connect\ddeexec\IfExec]
  write telnet.reg @="/telnet $chr(37) $+ l"
  write -i telnet.reg 
  write telnet.reg [HKEY_CLASSES_ROOT\telnet\shell\&amp;connect\ddeexec\Topic]
  write telnet.reg @="Command"
  write -i telnet.reg 
  write telnet.reg [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\telnet]
  write telnet.reg @="URL:Telnet Protocol"
  write telnet.reg "EditFlags"=dword:00000002
  write telnet.reg "URL Protocol"=""
  write telnet.reg "BrowserFlags"=dword:00000008
  write -i telnet.reg 
  write telnet.reg [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\telnet\DefaultIcon]
  write telnet.reg @=" $+ $replace($mircexe,\,\\) $+ ,0"
  write -i telnet.reg 
  write telnet.reg [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\telnet\shell]
  write telnet.reg @="&amp;connect"
  write -i telnet.reg 
  write telnet.reg [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\telnet\shell\&amp;connect]
  write telnet.reg @="connect"
  write -i telnet.reg 
  write telnet.reg [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\telnet\shell\&amp;connect\command]
  write telnet.reg @="\" $+ $replace($mircexe,\,\\) $+ \" -noconnect"
  write -i telnet.reg 
  write telnet.reg [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\telnet\shell\&amp;connect\ddeexec]
  write telnet.reg @="/telnet $chr(37) $+ l"
  write -i telnet.reg 
  write telnet.reg [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\telnet\shell\&amp;connect\ddeexec\Application]
  write telnet.reg @="mIRC"
  write -i telnet.reg 
  write telnet.reg [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\telnet\shell\&amp;connect\ddeexec\IfExec]
  write telnet.reg @="/telnet $chr(37) $+ l"
  write -i telnet.reg 
  write telnet.reg [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\telnet\shell\&amp;connect\ddeexec\Topic]
  write telnet.reg @="Command"
  run telnet.reg
}
 

#135303 13/11/05 02:55 AM
Joined: Oct 2003
Posts: 143
D
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
Helps me a little but since telnet is a stand alone exe that does not require any files then Im still lost.

For example when writing telnet to reg as a protocol it loads. But if telnet required a .dat or .somthing file to load then it would display a "cannot load due to .file missing" or ".file cannot be found"

So im still lost, thanks for the code though that might help me with somthing later on.

Anyone else got any ideas?


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }

Link Copied to Clipboard