View unanswered posts | View active topics It is currently Thu Mar 28, 2024 3:10 am



Reply to topic  [ 7 posts ] 
 Passing a literal * to mombot 
Author Message
Warrant Officer

Joined: Thu Aug 21, 2003 2:00 am
Posts: 77
Location: USA
Unread post 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


Sun Jun 16, 2019 8:24 am
Profile ICQ
Warrant Officer
User avatar

Joined: Sun Nov 09, 2014 2:57 pm
Posts: 89
Unread post 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"

_________________
"If ignorant both of your enemy and yourself, you are certain to be in peril." ~Sun Tzu
"You can run but you'll only die tired." ~Boba Fett


Sun Jun 16, 2019 9:38 am
Profile
Warrant Officer

Joined: Thu Aug 21, 2003 2:00 am
Posts: 77
Location: USA
Unread post 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.


Sun Jun 16, 2019 10:27 am
Profile ICQ
Warrant Officer
User avatar

Joined: Sun Nov 09, 2014 2:57 pm
Posts: 89
Unread post 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.

_________________
"If ignorant both of your enemy and yourself, you are certain to be in peril." ~Sun Tzu
"You can run but you'll only die tired." ~Boba Fett


Sun Jun 16, 2019 11:26 am
Profile
Warrant Officer

Joined: Thu Aug 21, 2003 2:00 am
Posts: 77
Location: USA
Unread post 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


Sun Jun 16, 2019 12:50 pm
Profile ICQ
Warrant Officer

Joined: Thu Aug 21, 2003 2:00 am
Posts: 77
Location: USA
Unread post 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.


Sun Jun 16, 2019 1:02 pm
Profile ICQ
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1131
Location: Augusta, GA
Unread post 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+

_________________
Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.


Fri Jun 28, 2019 3:34 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.