: converts wrong to regexp and window glitch

Posted by Shadowfyr on Fri 08 Nov 2002 02:28 AM — 8 posts, 19,519 views.

USA #0
First off.. : is incorrectly converted in aliases (and probably triggers) when you use 'convert to regular expression'. While it has special meaning with relation to specific words such as :alphanum:, it does not have a special meaning by itself. The result is that \: will never match, but this is what the client converts it to.

Second.. This has been around for a long time. I normally only have one world open and maximized. If you open a second world, then later close the client, the next time I start the client my previously 'maximized' window has been compressed down to as small as it will go and when I re-maximize it, the input window is also at the minimum of one line.

This is quite annoying, since I can't add my test world to the autoloader and have everything end up back where I put it the last time. It seems like having more than one world open is causing the world window settings to not be saved when the window(s) in question have been maximized to fit the client's main window. I am not sure if it is also doing this with worlds that are intentionally left non-maxed, but since a lot of people intentionally leave room for notpad windows, etc., I have to assume that it is only maximized ones being effected.
Australia Forum Administrator #1
Quote:

The result is that \: will never match, but this is what the client converts it to.


Seems to match when I try it. Can you give me an example regexp where it doesn't?

eg.

^eat\:me$

This matches when I type "eat:me" on the command line.
Australia Forum Administrator #2
I am planning to move the window positions to the world file. This should fix up some of these glitches.
USA #3
This one failed as a regexp alias>

^(bs|gossip) (\:|\;)?(.*)

Making it:

^(bs|gossip) (:|\;)?(.*)

fixed the problem..

When it called the script the supposedly 'correct' version would match on>

bs Hello --> wildcards = "bs", "", "Hello"
bs ;lol --> wildcards = "bs", ";", "lol"

but failed to return the : when given a line like>

bs :blinks rapidly. -> wildcards = "bs", "", ":blinks rapidly."

Looking over the regexp docs I see that : is used someplace where it needs to be \:, but it doesn't seem to want to work correctly in the case above. :p
Australia Forum Administrator #4
This doesn't seem to be my day for reproducing reported problems. :)

I used this alias:


<aliases>
  <alias
   match="^(bs|gossip) (\:|\;)?(.*)"
   enabled="y"
   regexp="y"
  >
  <send>think 1 = %1
think 2 = %2
think 3 = %3</send>
  </alias>
</aliases>


I typed:


bs :blinks rapidly.


I got:


think 1 = bs
think 2 = :
think 3 = blinks rapidly.
1 = bs
2 = :
3 = blinks rapidly.


So, it seems to work for me. :)
USA #5
Very strange.. Maybe it is something in the script call. The script I used was>

sub Surname(name, output, wilds)
  dim MyName
  Myname = "Testing"
  select case wilds(2)
    case ":",";"
      world.send wilds(1) & " " & wilds(2) & wilds(3)
    case else
      world.send wilds(1) & " " & ":" & MyName & ": " & wilds(3)
  end select
end sub


A world.note wilds(2) returned a blank line with the alias. :p It may be returning the right thing in the alias itself, but it executed the 'case else' section when it called the script. This is in version 3.30 BTW. I haven't gotten the new version yet.

I have since modified the script to split case up more, so ; and : are handled differently, but it should 'I assume" not work at all with '^(bs|gossip) (:|\;)?(.*)' do to the lack of \:, but instead I had to use that form to have it work right. This makes no sense.. :p
Amended on Sat 09 Nov 2002 02:56 AM by Shadowfyr
Australia Forum Administrator #6
No it doesn't make sense. I really need a reproducable case before I can do much with it.
USA #7
Grr... I must have originally mispelled something.. :p It works both ways now when trying a simple call and some notes. Sigh... Never mind I guess. lol