mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 27
S
silent Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Dec 2002
Posts: 27
Hi,

ive wrote a DLL for mirc, the problem is, it returns a long string, so that i have to use a binvar. But how do i do it?

The string looks like this:

string1;string2;string3...and so on.

so theyr seperated by ";".

How can i loop the string until theres no ";" anymore with a binvar?

i want to have it like this:

Code:
&binvar = $dll(my.dll, proc, params)
while ($pos(&binvar, ;) != 0) { 
  echo -a $read(&binvar, 1, Pos(&binvar, ;)-1)
  delete &binvar 1 $pos(&binvar, ;)
} 


In words i want this:

- Get the long string from the DLL
- Loop it until theres no ";" anymore
--- echo string until ";" -1
--- delete string until ";"

How do i do that?

Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
First of all, the method you're using won't even work (as /bset also has a string limit, so you couldn't set the variable in the first place)
You'll have to have your dll write to a file and then have mIRC /bread that into a binary variable. Finally, you can use /breplace to change the ; to another character.


New username: hixxy
Joined: Dec 2002
Posts: 27
S
silent Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Dec 2002
Posts: 27
hi tidy_trax,

much thanks for your post.

hmmm, is there really no other way than create a file? frown

Joined: Apr 2004
Posts: 871
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 871
Or, get the string in pieces from the DLL instead, i.e. $dll(mydll,getstring,1) would return string1, $dll(mydll,getstring,2) would return string2 etcetera.. that should make processing of the pieces in the script trivial at least, as you wouldn't need binvars at all anymore. You'd have to split up the string in your DLL code (and store it between DLL calls) though.


Saturn, QuakeNet staff
Joined: Dec 2002
Posts: 27
S
silent Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Dec 2002
Posts: 27
ty smile


Link Copied to Clipboard