mIRC Home    About    Download    Register    News    Help

Print Thread
#106795 04/01/05 04:54 AM
Joined: Oct 2003
Posts: 13
Eistee Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Oct 2003
Posts: 13
Is there an ActiveX or something like that to control mIRC from an local excuted html page (JScript)? (HTML-Application *.hta)

send text to an channel
check if i am on a channel
and so on

-----------------------
sorry for my bad english

Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Not really. There are two ways to communicate with mIRC, DDE and the SendMessage() API, but neither of them is available in JScript.

If you want and know how, you can write an ActiveX DLL that uses either of the mentioned ways, and this will give you complete control over mIRC. See the help file for technical info.

Meanwhile, here is a partial solution that will let you throw commands at mIRC (I'm saying "throw" because you can't tell whether the command arrives and when it completes).

First, download Zruntime DLL and place it in the same directory as your .HTA file.

Then, put something like this in your source code:

Code:
<HTML>
<HEAD>
 
<SCRIPT>
function init()
{
	try
	{
		oWSH = new ActiveXObject('WScript.Shell');
	}
	catch(e)
	{
		alert('Fatal error: ' + e.description);
	}
}
 
init();
 
function send(cmd)
{
	var rundll;
	rundll = 'rundll32 Zruntime.dll,DDEmIRC mIRC,' + cmd;
	oWSH.Run(rundll);
}
 
</SCRIPT>
 
</HEAD>
<BODY SCROLL="no">
 
<INPUT type="text" size="55" id="oSendBox"
 value="/echo -s moo">
<INPUT type="button"
 onclick="send(oSendBox.value)"
 value="Send to mIRC">
 
</BODY>
</HTML>


HTH, and sorry that I can't help any further.

Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Useful .dll, thanks for that one. smile

Joined: Oct 2003
Posts: 13
Eistee Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Oct 2003
Posts: 13
grate dll thx

it helps me for beginning

If a few Programers here somewhere can write a exe file it will be grate or equal activex.
it would make many new things possible in scripting.

mfg Eistee


Link Copied to Clipboard