Detecting menus

Use this board to ask questions or have discussions with other Genie users.
Post Reply
d.dolphin
New User
Posts: 2
Joined: Sun Jun 16, 2019 1:43 am
First Name: David
Last Name: Dolphin
Company Name: Flower Power
Phone: 4184897231
Address 1: 25 Dover Street
City: Summer Hill
State / Province: Outside Canada/USA
Zip / Postal Code: 2130
Country: Australia
Contact:

Detecting menus

Post by d.dolphin »

We have a custom menu system that allows progressive entry of options to lower levels.
For example:
The main menu has fields to enter up to 5 levels at once if I know the path is say 50 12 2 4 If type that in all at once it works OK.
However, to progress to each menu level I would first enter 50 in the first field and press enter to got to MENU50.
When I am on MENU50, the cursor is sitting in the second field to the right of the "50" anticipating the next level to be typed in.
Then I can move the cursor over any menu option (12 in this case) and it receives the focus.
When I click it, it puts the option 12 in the first field overwriting the 50 and "presses enter" so the menu system thinks I have taken option 12 on the main menu. Is there a way to tell it to put the menu option selected by the mouse into the field where the cursor is?
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Detecting menus

Post by Scott Klement »

I'm not familiar with a menu system like the one you describe, so I'm not 100% certain that I understand what you are asking.

What I think I understand is that after you select menu '50', it goes to the next screen where the input field is already set to '50 ' and the cursor is positioned immediately after the 50 for you to type the '12' from that screen. But, something (maybe Genie's automatic menu detection) is replacing the 50 with the 12 rather than concatenating the 12 to the end of the field.

Assuming I'm right about that, you'll need to turn off the automatic menu detection. Genie's menu detection is not written for the style of menu you're using, it does not understand the system or know how to work with it.

Instead, if you wish to have an automatic detection, you'll need to write your own with JavaScript. The idea would be to write code that scans the display for some common pattern that identifies it as a menu, and if you find such a thing, write your own code to set the new value. An easy way to do that, might be to use the get() API to get the current value in the input blank, then concatenate the new menu option to the end, and use pui.set() to set the new value, before running pressKey() to press enter.
d.dolphin
New User
Posts: 2
Joined: Sun Jun 16, 2019 1:43 am
First Name: David
Last Name: Dolphin
Company Name: Flower Power
Phone: 4184897231
Address 1: 25 Dover Street
City: Summer Hill
State / Province: Outside Canada/USA
Zip / Postal Code: 2130
Country: Australia
Contact:

Re: Detecting menus

Post by d.dolphin »

Thank you Scott.
You were correct in your assumption about the structure of the menu.
It will be safer to turn off the menu recognition and leave it the same as the green screen where they have to type in option numbers anyway.
Regards,
David Dolphin
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest