Escape characters in MS?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
bgreer

Escape characters in MS?

Post by bgreer » Sun Nov 21, 2004 12:58 am

Short version: Is there an escape character in MS so that I can represent a double quotation mark (") as being *part* of a string rather than a syntax error?

Long version: I have a script that operates a dialup emulator with my modem. Unfortunately, connections on the other end are erratic, and often I get error screens of random text. I have written my macro to grab key locations in the window and check then versus what they should be, but occasionally the random text contains a quotation which makes a syntax error in my evaluation of the expression that checks.

I tried a workaround where I look for quotation marks in each of the small strings I am checking, and if there is one, it will redial. However, my check as is does not work so I can only assume I need an escape character in order to use Position> to find if there is a quotation mark in a string.

Does anyone know/have ideas? Also, am I missing any other characters which might mess up my expression?

Code below:
Gosub>Check_For_Quotes
If>good_var=1,dial_check,redial

Label>dial_check
If>{(%cond_1%="KDRU") OR (%cond_2%="STATUS")},dial_success,redial

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 » Sun Nov 21, 2004 3:40 am

Make a variable to represent the " mark, then look for the variable:

Let>quote="
Position>%quote%,string,1,result
If>%result%>0,QuoteFound,NoQuote
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