aXes 4.2. - menu items showing menu item number

Use this Forum to post your “How to …” questions about your use of aXes. This is not a technical support forum. Both the aXes Support Team at LANSA and other aXes customers may answer your questions. LANSA cannot guarantee the accuracy of any information posted by customers.

Moderator: jeanmichel

Post Reply
Joerg Hamacher
Posts: 40
Joined: 09 Mar 2016, 00:29

aXes 4.2. - menu items showing menu item number

Post by Joerg Hamacher »

Hi again,

what do I have to do in autogui+ definiton of "AutoGUI Menu item" to display not only the text of a menu item but also the menu item number?
Property "useImage" is "ON".
For example: how can I change property "displayText" to display "90. Logoff" instead of only "Logoff"?

Best regards and many thanks in advance,
Joerg
jaimosky
Posts: 40
Joined: 30 May 2017, 16:48

Re: aXes 4.2. - menu items showing menu item number

Post by jaimosky »

Hi Joerg,

You can play with AutoGUI Menu Item / properties / extension / displayText (you change it to script)
and place following script there:

Code: Select all

var valueText = FIELD.getValue().trim();
var valuenextField = FIELD.nextField().getValue().trim();
var pointPos = valuenextField.indexOf(".");
if (pointPos ==-1) valueText = valueText + ' ' + valuenextField;
ENV.returnValue = valueText;
If you want to remove the dot, just use this line before the last line

Code: Select all

valueText = valueText.replace(".", "");
I hope it helps.
Jaime
Joerg Hamacher
Posts: 40
Joined: 09 Mar 2016, 00:29

Re: aXes 4.2. - menu items showing menu item number

Post by Joerg Hamacher »

Hi Jaime,
that's exactly what I was looking for :-)

Thank you very much,
Joerg
Post Reply