How to get ascii for the following charecters

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
cplusplus
Newbie
Posts: 3
Joined: Tue May 05, 2009 8:36 pm

How to get ascii for the following charecters

Post by cplusplus » Mon Jan 04, 2010 7:18 pm

I have a filemonitoring application, it is using macroscheduler .scp scripts.

Before it processes a file, it checks the filename, and make it work:

i am having problem with these two charecters, the application is tweaking replacing them with another wild charecter:

"ñ" is becoming this: "¤"

"2ª" is becoming this with a pipe symbol: "2¦"

The above two charecters are widely used by one of our clients in spain.
Please help i have the following script testfilename:

Code: Select all

SRT>Testfilename
let>filetest=Passed
Let>SomeString=%flline%
Length>SomeString,sl
Let>sl=sl+1
Let>s=1
Label>sckackloop
If>s=sl,donewithtest
MidStr>%SomeString%,s,1,testchar
VBEval>Asc("%testchar%"),testasc
If>{(%testasc% >=32) AND (%testasc% <127>s=s+1
Goto>sckackloop
Else
let>filetest=failed
Endif
Label>donewithtest
End>Testfilename
Thank you very much for the helpful information.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Jan 05, 2010 1:31 am

Some quick, non prioritized observations:

1. This may just be a typo on the forum, but I seem to be missing some chars:

If>{(%testasc% >=32) AND (%testasc% s=s+1)}

2. You may need to set a variable for s=s+1 before using in the IF statement.
3. You may also need to include another AND vs. using s=s+1

4. There also appears to be a space char after %testasc%

5. Also suggest not using single char variables like "s". This has been much discussed on this forum.

Again, these were just some quick thoughts that may not be relevent to your problem.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts