www.ClassicTW.com http://classictw.com/ |
|
Passing a literal * to mombot http://classictw.com/viewtopic.php?f=15&t=35547 |
Page 1 of 1 |
Author: | Deign [ Sun Jun 16, 2019 8:24 am ] |
Post subject: | Passing a literal * to mombot |
Anyone know a way to pass (or perhaps I should be saying read) a literal '*' in the command line to mombot? I'm guessing my trouble is that it is being converted to a \r before I even receive it. Deign |
Author: | rider2 [ Sun Jun 16, 2019 9:38 am ] |
Post subject: | Re: Passing a literal * to mombot |
In BooSDT they used something i hadn't seen before. Apparently you can pass "#42" as * literal. ...It is the ascii value for * from booSDT- "send " a n n n n y 99" #42 " a n n n n n y 99" #42" |
Author: | Deign [ Sun Jun 16, 2019 10:27 am ] |
Post subject: | Re: Passing a literal * to mombot |
rider2 wrote: In BooSDT they used something i hadn't seen before. Apparently you can pass "#42" as * literal. ...It is the ascii value for * from booSDT- "send " a n n n n y 99" #42 " a n n n n n y 99" #42" I figured you could create a string that way (used to have to pass an ascii string like that to access CIM back in the day). But how to read a string like " A*B*C " correctly? I think the * is already stripped out by the time my script receives it. |
Author: | rider2 [ Sun Jun 16, 2019 11:26 am ] |
Post subject: | Re: Passing a literal * to mombot |
I'm not sure I understand the goal:) CURRENTANSILINE will trap what is there and you can look at it. |
Author: | Deign [ Sun Jun 16, 2019 12:50 pm ] |
Post subject: | Re: Passing a literal * to mombot |
rider2 wrote: I'm not sure I understand the goal:) CURRENTANSILINE will trap what is there and you can look at it. Nothing monumental. I wanted to learn to write TWX scripts and implement them in mombot, so I was trying to think of something simple that hadn't been done yet. Well, sometimes it would be nice to have a calculator at your fingertips, so I ... All the operators work except the traditional multiplication *. Just can't figure out how to parse that out correctly. I can substitute another character like x or m and it works fine. But anyhow, it was sort of an interesting problem in itself and I figured someone who knew more about TWX than I would know about some string handling function that I hadn't thought of. 'dgn bc 27/3 ... S: {dgn} 27 / 3 = 9 |
Author: | Deign [ Sun Jun 16, 2019 1:02 pm ] |
Post subject: | Re: Passing a literal * to mombot |
Your solution worked. I can identify the character #42 as what it is, and use it without it being interpreted as something else. Thank you sir. |
Author: | ElderProphet [ Fri Jun 28, 2019 3:34 pm ] |
Post subject: | Re: Passing a literal * to mombot |
Once upon a time, I wrote a script to help locate ANSI codes to aid at times like this. That script is named "+EP+ ASCII Code Parser", and is available at grimytrader.com, just search for ElderProphet as the script author. Feel free to give that a try. It hasn't been updated, but likely still works. +EP+ |
Page 1 of 1 | All times are UTC - 5 hours |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |