Modal dialog scripting: would like to press Enter instead of Click OK
I have a modal dialog script with [OK] and [Cancel] buttons where the pre-populated entry is most often accepted rather than typed over.
I would like to be able to press Enter to accept rather than clicking the OK button to accept.
Is there an easy way to do this?
My script right now is
New Window( "Enter Number",
<<Modal,
Text Box( "Enter Number" ),
variablebox = Number Edit Box( UsuallyTheRightNumber ),
Button Box( "OK" ),
Button Box( "Cancel" )
);
dt:height[i] = variablebox << get;
Again, the script is working fine but having to mouse click OK instead of just pressing Enter is a major inconvenience.
Thanks
Charlie