Escaping Special Characters

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

Alisandra
orc pawn
orc pawn
Posts: 28
Joined: Fri Aug 30, 2002 9:55 pm

Escaping Special Characters

Post by Alisandra » Wed Feb 25, 2004 2:25 pm

Hi,

Is there a way of escaping 'special' characters like quotes, (), etc? Every now and then, Event_Chat decides to kill the macro on some of the conditional statements because one of the incoming strings has a special character in it.

ie: /if "$lcase("@MsgText")"~~"somestring" {}

Thanks!

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Wed Feb 25, 2004 6:53 pm

Take a look at my autolink.mac macro in the depot. I had to throw away special characters like > and <. Look at the sub that is at the bottom of the macro. It might be confusing but that is how I went about it, otherwise macro's would get stuck in a nasty loop when they encountered some characters.