|
Joined: Apr 2004
Posts: 759
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2004
Posts: 759 |
This is unrelated to my previous COM suggestion so i posted a new thread: $com().result is obviously bound to the ~900 char limit, however in alot of cases you would get more back from it. Now since mIRC must(?) get back the whole deal anyways why not allow us to somehow read that buffer ? i.e the following works because the return is less then 900 chars.
alias xmlhttp if ($+(xml,$com(0))) return $v1
alias msxml {
.comopen $xmlhttp msxml2.xmlhttp
noop $com($v1,open,1,bstr,get,bstr,http://hiscore.runescape.com/index_lite.ws?player=zezima,bool,-1) $&
$comcall($v1,response,send,1)
}
alias response {
noop $com($1,responseText,2)
echo -a ResponseText: $com($1).result
.comclose $1
}
(i'm not a runescape player btw!) However connecting to a bigger site your unable to get the response back. It would be absolutely brilliant to do something like this:
while ($com($1).resultbr) echo -a $v1
or even better:
while ($com($1,400).result) echo -a $v1
which would fetch the result in sets of 400 characters. Not sure if the 2nd parameter can be built in like that though. Kind Regards.
Last edited by Mpdreamz; 12/01/08 07:11 PM.
$maybe
|
|
|
|
Joined: Oct 2003
Posts: 3,918
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,918 |
The data buffering should be done from the COM end of it... or you could throw the results into a file to buffer easily.
- argv[0] on EFnet #mIRC - "Life is a pointer to an integer without a cast"
|
|
|
|
Joined: Apr 2004
Posts: 759
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2004
Posts: 759 |
Theres 2 problems with that 1 you can't always control it from the COM end of it, and in order to throw the results into a file buffer you need to be able to request the result of the com even when its over ~900 chars which is what i am asking for.
$com(name).result, simply returns NULL if the result exceeds 900 chars.
$maybe
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
My use of COM is limited to very specific situations, such as computer specs, so I really don't know much about it. However, is all of the information actually in the $com? If you check the $len of the $com's results, do you see it as being over 900? If it actually does have that information in there and it just can't be displayed because it's too much, maybe you can store it in a binary variable and handle it that way? As I said, I haven't worked much with COM and this may not be possible. I just thought I'd throw it out.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Apr 2004
Posts: 759
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2004
Posts: 759 |
Not a bad way of thinking, but sadly not true. Somewhere between recieving the COM results internally and storing it it's discarded simply because it's over 900.
$maybe
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Ok, like I said, I didn't know and was just throwing it out. Sounds like mIRC should at least allow it to be kept within $com even if you have to store the $com as a binary variable to use it afterwards.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Dec 2002
Posts: 503
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 503 |
Or possibly do buffering like the /sockread behaviour. Maybe a way to get a /comcall to trigger a "ON *:COM:" event or some such so you can do incremental reads on the return values.
Or just simply the ability to return into a &binvar.
|
|
|
|
Joined: May 2007
Posts: 37
Ameglian cow
|
Ameglian cow
Joined: May 2007
Posts: 37 |
Or possibly do buffering like the /sockread behaviour. Maybe a way to get a /comcall to trigger a "ON *:COM:" event or some such so you can do incremental reads on the return values.
Or just simply the ability to return into a &binvar. The latter idea sounds good. $comcall supports being able to run the result through an alias, so why not allow the ability to store it in a binvar? Would help with long results. The same functionality would be nice with $cb as well, which cannot return data in the clipboard if one of the lines is >900 chars.
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
I'd rather see $com(a,&bvar).result
|
|
|
|
Joined: Oct 2003
Posts: 3,918
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,918 |
Putting it in a binvar is probably the best idea. More consistent, and stays away from mIRC having to do any buffering.
- argv[0] on EFnet #mIRC - "Life is a pointer to an integer without a cast"
|
|
|
|
Joined: Apr 2004
Posts: 759
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2004
Posts: 759 |
I can live with that anyday, and i rather have it too. Since such a thing can be added gradually on alot more identifiers that might need it i.e $cb.
$maybe
|
|
|
|
Joined: Oct 2003
Posts: 3,918
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,918 |
In the meantime, can you not write a COM-based wrapper script (VB script?) to throw the data results into a file and buffer it like that?
- argv[0] on EFnet #mIRC - "Life is a pointer to an integer without a cast"
|
|
|
|
Joined: Apr 2004
Posts: 759
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2004
Posts: 759 |
Oh of course, and i have done so numerous times which is why i finally had enough of it and asked for this feature suggestion which would be alot neater.
$maybe
|
|
|
|
|