mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2006
Posts: 9
B
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: May 2006
Posts: 9
Does anyone know if there's a way to do a wildcard search on an ini file...

For example,

[Blah1]
1=yes
[Blah2039]
1=Who?

A wildcard search on Blah*

Sort of: $ini(%DataFile,w,Blah*,0)

Anyone know of anything, and if not, can a mod move this to the suggestions forum? smile

Emails are okay, blackspider@shast.co.uk

Thanks in advancezor smile

Joined: May 2006
Posts: 9
B
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: May 2006
Posts: 9
Hm, well, I've written a bodge-version, but it has problem because there isn't a command to reset $readn.. Here's the script so far...

Code:
Alias wini {
  if ($3 == 0) { 
    var %n = 0
    var %y = 1
    while (%y == 1) { 
      var %retval = $read($1,w,$2,$calc($readn + 1))
      if (%retval != $null) { inc %n }
      else { var %y = 0 }
    }
    return %n
  }
  else if ($3 > 0) { 
    var %n = 0
    var %y = 1
    while (%y == 1) { 
      var %retval = $read($1,w,$2,$calc($readn + 1))
      if (%retval != $null) { inc %n }
      else { var %y = 0 }
      if (%n == $3) { return %retval }


    }

  }
  else { return Wini: Error }
}


If anyone knows how to force $readn to reset to 0, it'd be helpful smile

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Quote:
If anyone knows how to force $readn to reset to 0, it'd be helpful


!.echo -q $read


Gone.
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
i think that errors actually

!.echo -a $read(con,0)

or even since everyone mentioned it last time i used echo -q

mirc 6.17 >> noop $read(con,0)

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
I prefer to use commands that are valid for atleast the last few versions of mIRC if possible. Especially since many people are holding on to mIRC 6.16 until there is a bugfix for the latest version, so /noop is a command I never use.

Anyway, I have this on input event that echoes and evaluates anything that I type in the status window, like typing $me will echo my nickname, because I have something like: echo -a [Status] $($1-,2) There the $read worked so I assumed !.echo -q $read would work but guess not. Anyway one can just use:

//!.echo -q $read(*)

An asterisk, as that can never be part of a filename, therefore guaranteeing that $readn will be reset.

Or a small adjustment to what I first suggested: //!.echo -q $($read)


Gone.

Link Copied to Clipboard