Use of apostrophes

Advanced programming using WinTask scripting language

Use of apostrophes

Postby mepsztein on Thu Apr 11, 2013 9:27 pm

I have a script that reads last names and click on a field containing the last name using the sequence:

customer$="O'Neill"
Strtoclk$="TD[OUTERTEXT= '"+customer$+"']"
ClickHTMLElement(Strtoclk$)
mepsztein
 
Posts: 2
Joined: Thu Apr 11, 2013 8:46 pm

Re: Use of apostrophes

Postby TechSupport on Fri Apr 12, 2013 7:46 am

Hello,

You need to replace the ' by '\
You can do it using Replace$ function:
customer$=replace$(customer$, "'","\'")
And then the same syntax for ClickHTMLElement will work:
Strtoclk$="TD[OUTERTEXT= '"+customer$+"']"
ClickHTMLElement(Strtoclk$)

Regards.
WinTask Tech Suport
TechSupport
 
Posts: 805
Joined: Thu Nov 16, 2006 9:58 am


Return to Scripts programming

Who is online

Users browsing this forum: No registered users and 1 guest