How Can i Catch the data from a IE window that is created using nHTMLn_2.95.dll
A TG007 community discussion started by feroz_shamsi.
How Can i Catch the data from a IE window that is created using nHTMLn_2.95.dll
Do you mean like getting text from chat? Also, have you already created a code to add an html window? I don't know where you are at right now in your coding. So, i need to know where to start to help you.
Here is a tutorial on using nHTMLn_2.95.dll for webchat...
just navagate it to where ever u wanna go and echo it. kinda like a debug
you need to add a handler if its like 2.92
$dll($scriptdir $+ dlls\nHTMLn_2.92.dll,handler,nHTMLn.handler)
alias nHTMLn.handler { echo -s $1- }
havnt used it mtself but thats the code from my debug for 2.92
My code does NOT have bugs. It just develops random features.
Take this Example
alias yahoosock { if ($sock(yahoo)) sockclose yahoo | sockopen yahoo [url="http://www.yahoo.com/"]www.yahoo.com[/url] 80 }
on *:sockopen:yahoo:{ sockwrite -n $sockname GET / HTTP/1.1 $+ $crlf $+ User-Agent: Vincula/ $+ $vver (compatible; MSIE 6.0; Windows NT 5.1) $+ $crlf $+ Accept: */* $+ $crlf $+ Accept-Language: EN-US | sockwrite -n $sockname Host: [url="http://www.yahoo.com/"]www.yahoo.com[/url] $+ $crlf $+ Connection: Close $+ $crlf $+ $crlf }
on *:sockread:yahoo:{
if ($sockerr) { halt }
else { var %yahoo | sockread %yahoo | if ($remove(%yahoo,$chr(32))) && ($len(%yahoo) < 900) { bset -t &yahoo 1 %yahoo } }
if ($bvar(&yahoo,0) > 0) {
tokenize 32 $bvar(&yahoo,1-).text | var %X = $htmlfree($1-)
echo @debug Read $sockname $1-
}
}
alias yahoodll {
echo $color(info) -st * 4Opening Yahoo
var %Wn @Yahoo , %Sky.url [url="http://yahoo.com/"]http://yahoo.com[/url]
window -kpdhx %Wn
window %Wn mirc.exe 18
titlebar %Wn Trying to Catch The data that comes up from yahoo.com
var %m
%m = $msn.ndll(attach,$window(%Wn).hwnd)
%m = $msn.ndll(select,$window(%Wn).hwnd)
%m = $msn.ndll(handler,yahoo_Whnd)
%m = $msn.ndll(navigate,%Sky.url)
}
alias yahoo_Whnd {
if ($2 == new_window) return S_CANCEL
if (title_change Cannot find server* iswm $2-) {
echo -s 4Error: Couldnt find Server or DNS Error
}
if (!$window(@nHTMLnDebug)) /window -n @nHTMLnDebug
echo @nHTMLnDebug 4 $+ $2 3 $+ $3-
return S_OK
}
now see at @nHTMLnDebug window
and at @debug window
dll debug window will only show navigate begind or download complete status change etc etc
but @debug window will show what data is writen on www.yahoo.com i want to catch that socket method data
using nHTMLn.dll
i hope it clears up ![]()
alias yahoosock { if ($sock(yahoo)) sockclose yahoo | sockopen yahoo [url="http://www.yahoo.com/"]www.yahoo.com[/url] 80 }
on *:sockopen:yahoo:{ sockwrite -n $sockname GET / HTTP/1.1 $+ $crlf $+ User-Agent: Vincula/ $+ $vver (compatible; MSIE 6.0; Windows NT 5.1) $+ $crlf $+ Accept: */* $+ $crlf $+ Accept-Language: EN-US | sockwrite -n $sockname Host: [url="http://www.yahoo.com/"]www.yahoo.com[/url] $+ $crlf $+ Connection: Close $+ $crlf $+ $crlf }
on *:sockread:yahoo:{
if ($sockerr) { halt }
else { var %yahoo | sockread %yahoo | if ($remove(%yahoo,$chr(32))) && ($len(%yahoo) < 900) { bset -t &yahoo 1 %yahoo } }
if ($bvar(&yahoo,0) > 0) {
tokenize 32 $bvar(&yahoo,1-).text | var %X = $htmlfree($1-)
dll pathtonhtmln_2.95.dll select $window(@debug).hwnd
dll pathtonhtmln_2.95.dll execScript document.body.innerHTML=document.body.innerHTML+'Read $sockname $1- $+ <br>'
dll pathtonhtmln_2.95.dll execScript scroll(0,9999999999)
}
}
Hey Warrior you didnt understand what i want
i Want that data type that comes using mIRC Sockets Using nHTMLn.DLL
Understand ?
Sign in to reply or start a new topic where your account has permission.