SRL Archive - SRL Bugs

ChooseOptionMultiEx


Er1k

2012-01-17 22:42:05

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.

Coh3n

2012-01-18 01:46:28

I'd rather fix it so the function doesn't result in "gibberish" at all. ;) I'll look into this when I can.

Er1k

2012-01-18 05:02:00

Thanks a lot :D 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.

Coh3n

2012-01-18 22:26:17

This is actually fixed in the latest version of SRL. Narcle's GetChooseOptions fix removed the "giggerbish". :)

Er1k

2012-01-18 22:28:31

Thanks. I will give it a run later today to see for myself :D