Skip to content
MSN

how to catch data ? nHTMLn_2.95.dll

A TG007 community discussion started by feroz_shamsi.

Discussion 8 posts
Page 1 of 1
Open
Topic #7060 · 8 published posts · 1,086 views

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...

http://www.tg007.net/forum/index.php?showtopic=2758

Edited Jul 23, 2006 11:45 AM by Warrior124

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

Edited Jul 23, 2006 2:49 PM by Ozzy10

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 <wo0t>

 

 

Edited Jul 23, 2006 6:29 PM by feroz_shamsi
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)
}
}

Edited Jul 23, 2006 10:12 PM by Warrior124

Hey Warrior you didnt understand what i want

 

 

 

i Want that data type that comes using mIRC Sockets Using nHTMLn.DLL

 

Understand ?

 

 

Hmm, don't know how to catch data like that from sockets myself. Maybe someone else can help, but I'll try to get some info, though.