err0r Posted October 7, 2009 Report Share Posted October 7, 2009 [New Oasiz Font Format] this is a sample text message S~:Tahoma;#333366;01; alias oasizstrip { return $regsubex($1-,/S~:.*$/gi,$null) } on *:text:*:#: { echo # $nick : $oasizstrip($1-) | halt } this will allow better use of mirc's on text event you will be able to use on *:text:!blah:#: { } Breakdown of the code attached S~:Tahoma;#333366;01; S~:<fonttype>;#<colorcode>;<stylenumber>; Style Numbers: 01=nothing/default 02=bold 03=italic 04=bold+italic 05=underline 06=bold+underline 07=italic+underline 10=bold,italic+underline Link to comment Share on other sites More sharing options...
Guest Travis Posted October 8, 2009 Report Share Posted October 8, 2009 I dont think thats a good idea... I mean how are you going to tell when text ends and the font string starts? People just need to know how to script around font strings. In fact I gave the example in this post. on *:text:*:#:{ tokenize 32 $fontstripper($1-) if ($1 = Hello) msg # Hello $nick ! } Link to comment Share on other sites More sharing options...
err0r Posted October 8, 2009 Author Report Share Posted October 8, 2009 not sure what you are asking... the font code starts with S~: and is at the end of the text.. the regex should handle that correctly Link to comment Share on other sites More sharing options...
err0r Posted October 8, 2009 Author Report Share Posted October 8, 2009 i told rob that it really wasn't something that was needed.. any scripter could easily use the old way. Rob just prefers the new way to make it easier for scripters using the on text command.. I'm guessing his reasoning is that on *:text:!blah:#: { } is easier than on *:text:*:#: { tokenize 32 $stripper($1) | if ($1 == !blah) { } } Link to comment Share on other sites More sharing options...
oasiz Posted October 8, 2009 Report Share Posted October 8, 2009 I'm guessing his reasoning is that on *:text:!blah:#: { } is easier than on *:text:*:#: { tokenize 32 $stripper($1) | if ($1 == !blah) { } } Exactly. Why force unnecessary code changes when it is possible to have the best of both worlds. I know as a coder I'd rather add 2-3 lines as a one-off than potentially have to edit 100's! Besides, the web-chat code is neater and parses faster, so everyone is happy Link to comment Share on other sites More sharing options...
err0r Posted October 8, 2009 Author Report Share Posted October 8, 2009 think i need to prune this topic now to reflect only the new one. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now