Results 1 to 5 of 5

Thread: ChooseOptionMultiEx

  1. #1
    Join Date
    Nov 2011
    Posts
    1,532
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default ChooseOptionMultiEx

    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.

  2. #2
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

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

  3. #3
    Join Date
    Nov 2011
    Posts
    1,532
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

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

  4. #4
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

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

  5. #5
    Join Date
    Nov 2011
    Posts
    1,532
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •