$com help needed - 25/02/11 03:34 PM
Currently I have an mSL script, writing the following vbscript, where $1- (the url) and %file are replaced within the script:
This script is then being executed from mIRC with the following where %s is the .vbs file:
Now my question is: Is there a way to get the quit error code while still keeping the 'threading'?
Code:
on error resume next Set C = CreateObject("msxml2.xmlhttp.3.0") if (err.number <> 0) then err.clear set C = CreateObject("msxml2.xmlhttp") if (err.number <> 0) then err.clear set C = CreateObject("XMLHttpRequest") if (err.number <> 0) then wscript.quit(1) end if end if C.open "GET", $qt($1-) $+ , false C.send if (err.number <> 0) then wscript.quit(2) T = C.getResponseHeader("Content-Type") if (T <> "") and (mid(T,1,6) <> "image/") then wscript.quit(3) set O = createobject("adodb.stream") if (err.number <> 0) then wscript.quit(4) O.type=1 O.mode=3 O.open O.write C.responsebody C.close O.savetofile %file $+ ,2 if (err.number <> 0) then wscript.quit(5) O.close
This script is then being executed from mIRC with the following where %s is the .vbs file:
Code:
.comopen %tvbs wscript.shell if ($comerr) { goto error } if ($comerr || !$com(%tvbs,run,1,bstr*,%s,uint,1,bool,true)) { goto error } .remove %s
Now my question is: Is there a way to get the quit error code while still keeping the 'threading'?