Currently ChooseOptionMultiEx recurses itself in order to attempt to click 'Cancel' to exit from the function. However this might cause the function to get into an infinite loop due to the OCR unit detecting gibberish (e.g. ' and . ) in GetChooseOptions, resulting Length(Options) >= 1 but in fact such option cannot be chosen at all.
I can suggest two solutions for now. The first one would be detecting whether the option is gibberish and exiting from the function if found so. The second solution would be to review whether Length(Options) = 1 should actually be discarded. I cannot think of any cases where there would be only one option found by GetChooseOptions, due to the fact that any existing options should come with Cancel.




Reply With Quote






I'll look into this when I can.
For the record, changing the exit condition from Length(Options) < 1 to Length(Options) <= 1 in ChooseOptionMultiEx has significantly reduced the chance of the occurrence of the infinite loop in the scripts I am having problems with. That said, if the options menus under any case do not have less than two options (this im not sure), this can work as a temporary fix before the gibberish can be resolved.
