Skip to main content

How can Kryon count the repetition of words in a variable?

With the find option:

26848iB506F0E33372EC6E.png

With Python im puzzled if I can use variables

26849i3B04C8310A40D2AC.png

The problem is that the $splitword$ can be different that is depending of the text.

26851iF0D78FA323906BA0.png

If it finds 1, than the splitword is determent an it needs to find how many of the are in the text.

For this demo its 'Non-skippable'

If you do a test in the advanced command 'find' it finds them ..no problem if you run iti in the script it finds 410!!! no idea why?

 

anyone a better idea?

2 problems you face,





1. The file you want to read is not detected due to incorrect file path.



Solution: Replace backslash () with slash (/)
>>> "M:/RPA/Projecten/PLA-OMD-001/GRAB/grabads.txt"




2. The SplitWord variable is not detected as a string, when called in python script.



Solution: Add quotation mark ("") in the Set value for SplitWord
>>> Set SplitWord to '"Non-skippable"'




Reply