Page 1 of 1

aXes 4.2. - menu items showing menu item number

Posted: 16 Jul 2020, 21:38
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

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

Posted: 21 Jul 2020, 23:46
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

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

Posted: 28 Jul 2020, 17:50
by Joerg Hamacher
Hi Jaime,
that's exactly what I was looking for :-)

Thank you very much,
Joerg