I was running a process earlier that was throwing the exception message:
I worked out that the string in a type into was throwing the error. The string contained square braces “[” and “]” around a number, like so: “William Coulson [0123]”. The type into picked it up as a special key, like Enter or Tab. I resolved this by running in debug and changing the value in the locals panel.
Is there any way of preventing this issue without replacing the data? I was thinking of setting SimulateType to true, but I am not sure how the bot would react. Does anybody know if setting SimulateType to true prevents the error message from coming up? Or have another solution?
Unfortunately the text is scraped off a form that the client sends us, and the data is pretty inconsistent, so the data may contain square braces, it may not. Ideally, I need to be able to prevent an error message coming up due to the square braces or any other special key symbol without replacing any of the data being written.
It works with SimulateType enabled, and doesn’t when it’s disabled. Also doesn’t work with SendWindowsMessages enabled or disabled and SimulateType disabled. Strange