mIRC Home    About    Download    Register    News    Help

Print Thread
#157436 25/08/06 05:42 AM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline OP
Hoopy frood
OP Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
I'd like it if there was a fourth parameter added to $did() which was an &binvar parameter. When supplied, all text from the control in question should be placed into &binvar, unless a line number is supplied in which case that line will be placed into &binvar. Spaces being reserved would be a huge plus.

The return value would be the size of the variable.

A matching /did ... &binvar to put a binary variable into a control would be great too.

#157437 26/08/06 03:43 AM
Joined: Feb 2004
Posts: 201
J
Jae Offline
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2004
Posts: 201
Generally you are unable to input data into a binary variable other than sockets or reading from a file, and perhaps one or two others i can't think of at the moment.
If it were to be done where you can simply insert data into a binary varliable whenever you like, surely we would be able to do so for many other commands?
I would then pose the question why it hasnt been opened to many commands as of yet (memory related?)
In either case it sounds like an ok idea, although depending on reasons binary variables have not been so widely implemented as of yet it may not happen.

#157438 26/08/06 03:56 AM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline OP
Hoopy frood
OP Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
I think it's more the fact it'll take a huge effort to implement them fully throughout the scripting language, but there's probably other reasons too.

Anyway, I just thought it'd make sense for dialogs considering there can be an unknown amount of data in controls under quite a few circumstances; /loadbuf to something, /filter to something, or a control that accepts user input (i.e. an edit). I also think there are at times circumstances where you could use a whole control of data in one go rather than parsing it line by line.

#157439 26/08/06 10:40 AM
Joined: Feb 2005
Posts: 342
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
Well, you can actually put anything you like into a binary variable. Even plain text with the -t switch.

You can actually store "binary data" into a hash table. This is a pretty big deal, as it's the only way (aside from writing the data to a file) to keep the binary data, and use it -after- a script has finished processing.

/hadd -m example my_data &mybinvar, and then use another script/alias to get the binvar from the hash table, and set it into another binvar, and then do whatever you want with it.

I've actually created a few scripts for this which stores all the binary data into a hash table from a webpage, and just left it in the hash so I could play around with parsing it.

As for the suggestion, I'm all for it.

Last edited by Rand; 26/08/06 10:42 AM.
#157440 29/08/06 10:44 AM
Joined: Feb 2004
Posts: 201
J
Jae Offline
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2004
Posts: 201
I bet your pardon, you are right. I am incorrect. Great idea! smile I have overlooked the -t swtich way to many times, thanks for pointing it out, now i can heavily use it as i wanted to and previously didnt realise i could.

Cheers.


Link Copied to Clipboard