TYVM Fordlawnmower, you're absolutely right, it's pretty sloppy on my part. I changed those things you mentioned the 'remove' has a dot to silence it, no more echoing it out, and the -t switch on the sockwrite.
If you check those pages, somehow they dont seem to have headers, I use firefox to try an view the source and i couldnt, the 1st thing in the sockread is GIF89a on every read shrug.
It just makes it easier to parse, (no parsing), i just read it all straight to a file.
Do you think you can tell me why when i try to use the images above 16 mirc gives me this error?
/did: 'yvisible' error loading 'C:\Documents and Settings\Default\Desktop\mIRC\online.gif'
there are 8 more images yahoo uses , or 16 more actually for online offline, 24 in all, i can only get the 16 to work without error.
Thanks again.
menu status {
Yahoo Visible Checker:/dialog -m yvisible yvisible
}
dialog YVisible {
title "Y! Visibility Check"
size -1 -1 195 208
option pixels notheme
edit "", 1, 2 150 138 20, edit autohs
button "Check", 2, 3 176 65 25
icon 4, 24 5 139 138
button "Close", 3, 127 176 65 25, ok cancel
combo 5, 143 151 52 70, edit drop
}
on *:dialog:yvisible:init:0: {
var %visb 1
while (%visb <= 16) {
did -i yvisible 5 %visb %visb
inc %visb
}
did -i yvisible 5 0 8
}
on *:dialog:yvisible:sclick:2: { $iif($did(yvisible,1).text == $null,echo -a You Must Enter A Name To Check On!,vischeck) }
alias vischeck { if ($exists(online.gif)) { .remove online.gif } | sockopen vischeck mail.opi.yahoo.com 80 }
on *:sockopen:vischeck: sockwrite -t vischeck $+(GET /online?u=,$did(yvisible,1).text,&m=g&t=,$did(yvisible,5).seltext,$crlf,$crlf)
on *:sockread:vischeck: {
if ($sockerr > 0) return
sockread &ysl
bwrite online.gif -1 -1 &ysl
}
on *:sockclose:vischeck: { did -g yvisible 4 0 online.gif }
You should put a dot(.) in front of this line -->> remove online.gif <<-- to keep it from echoing each time it removes a file.
You also need to put -t in the sockwrite statement.
This:
on *:sockopen:vischeck: sockwrite vischeck $+(GET /online?u=,$did(yvisible,1).text,&m=g&t=,$did(yvisible,5).seltext,$crlf,$crlf)
Should be this:
on *:sockopen:vischeck: sockwrite -t vischeck $+(GET /online?u=,$did(yvisible,1).text,&m=g&t=,$did(yvisible,5).seltext,$crlf,$crlf)
By default mIRC will treat anything that starts with & in a sockwrite as a binary variable, so &m=g&t= is resolved to $null $null. It doesn't seem to hurt the script but it would break it if m= and t= were needed. -t makes it treat everything as plain text.
You got it to work though and you did it with some style. Pictures instead of text, you certainly aren't a minimalist.
Intresting that this works without a Host: line and without removing the headers from the pictures.
I don't use Yahoo, but it would be a nice project to make a "friends tracker" script that pops up when one of your friends Goes offline/online.