03-25-2021 09:24 AM
Hello,
The following command works fine in a VBS script but I'm having trouble converting it to Python script with Diadem.
First is in VBS, second is in Python. The script documentation doesn't appear to have any python specific examples yet.
k = Find("Ch(""[2]/[7]"")>1",1)
k = dd.Find("Ch(""[1]/[29]"")>1",1)
Solved! Go to Solution.
03-25-2021 11:47 AM - edited 03-25-2021 11:48 AM
Hi,
The problem is that double- double quote ("").
In VBS, that is the escape to add a " within a string. In Python it is \" instead.
So you can write:
k = dd.find("Ch(\"[1]/[2]\")>10",1)
Or, even better, since Python supports both ' and " as beginning of a string:
k = dd.find('Ch("[1]/[2]")>10',1)
In this way, you don't need any escape!
03-25-2021 11:55 AM
That's got it! Thanks for the help and detailed explanation.