mIRC Home    About    Download    Register    News    Help

Print Thread
$com results #192922 12/01/08 07:08 PM
Joined: Apr 2004
Posts: 759
M
Mpdreamz Offline OP
Hoopy frood
OP Offline
Hoopy frood
M
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.

Code:
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:

Code:
while ($com($1).resultbr) echo -a $v1


or even better:
Code:
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
Re: $com results [Re: Mpdreamz] #192924 12/01/08 07:12 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
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"
Re: $com results [Re: argv0] #192935 13/01/08 02:05 AM
Joined: Apr 2004
Posts: 759
M
Mpdreamz Offline OP
Hoopy frood
OP Offline
Hoopy frood
M
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
Re: $com results [Re: Mpdreamz] #192937 13/01/08 03:05 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
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
Re: $com results [Re: Riamus2] #192951 13/01/08 12:27 PM
Joined: Apr 2004
Posts: 759
M
Mpdreamz Offline OP
Hoopy frood
OP Offline
Hoopy frood
M
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
Re: $com results [Re: Mpdreamz] #192987 13/01/08 09:03 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
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
Re: $com results [Re: Riamus2] #193003 14/01/08 12:08 AM
Joined: Dec 2002
Posts: 503
B
Bekar Offline
Fjord artisan
Offline
Fjord artisan
B
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.

Re: $com results [Re: Bekar] #193072 14/01/08 08:32 PM
Joined: May 2007
Posts: 37
C
Chessnut Offline
Ameglian cow
Offline
Ameglian cow
C
Joined: May 2007
Posts: 37
Originally Posted By: Bekar
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.

Re: $com results [Re: Mpdreamz] #193074 14/01/08 08:33 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
I'd rather see $com(a,&bvar).result grin

Re: $com results [Re: hixxy] #193076 14/01/08 08:49 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
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"
Re: $com results [Re: hixxy] #193077 14/01/08 08:54 PM
Joined: Apr 2004
Posts: 759
M
Mpdreamz Offline OP
Hoopy frood
OP Offline
Hoopy frood
M
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
Re: $com results [Re: Mpdreamz] #193079 14/01/08 08:57 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
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"
Re: $com results [Re: argv0] #193081 14/01/08 09:00 PM
Joined: Apr 2004
Posts: 759
M
Mpdreamz Offline OP
Hoopy frood
OP Offline
Hoopy frood
M
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