Modal dialog scripting: would like to press Enter instead of Click OKModal 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></MODAL>
Again, the script is working fine but having to mouse click OK instead of just pressing Enter is a major inconvenience.
Thanks
Charlie
Re: Modal dialog scripting: would like to press Enter instead of Click OKJust to complete the education on this topic, the documentation on the format and functions of the Number Edit Box is available at:
Help==>Scripting Index==>Number Edit Box
The description of the fields and elements that are available is there, plus actual examples that can be run that illustract how each of them work

Re: Modal dialog scripting: would like to press Enter instead of Click OKthanks
Re: Modal dialog scripting: would like to press Enter instead of Click OK14 is just the default number. 10 is the width of the box. depending on version of JMP if you don't put in a width it does some funky stuff.
Re: Modal dialog scripting: would like to press Enter instead of Click OKThanks.
What are the significance of 14 and 10 here?
Re: Modal dialog scripting: would like to press Enter instead of Click OKJust to confirm:
nw = New Window( "Enter Number",
<<MODAL></MODAL>
where the first argument is empty and the second argument is the number (actually a variable I called UsuallyTheRightNumber) that the text box defaults to.
Or does the number 10 have a special significance?
Re: Modal dialog scripting: would like to press Enter instead of Click OKCould also just make the function click the button for you. This would be if you click the box then click something else as well (if the number has changed) though. May not be what you want.
New Window( "Enter Number",
<<MODAL></MODAL>
Re: Modal dialog scripting: would like to press Enter instead of Click OKTry this
Names Default To Here( 1 );
nw=New Window(
"Enter Number",
<<MODAL></MODAL>