<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Modal dialog scripting: would like to press Enter instead of Click OK in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Modal-dialog-scripting-would-like-to-press-Enter-instead-of/m-p/34815#M20566</link>
    <description>&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;What are the significance of 14 and 10 here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 21 Jan 2017 00:05:55 GMT</pubDate>
    <dc:creator>galactus3000</dc:creator>
    <dc:date>2017-01-21T00:05:55Z</dc:date>
    <item>
      <title>Modal dialog scripting: would like to press Enter instead of Click OK</title>
      <link>https://community.jmp.com/t5/Discussions/Modal-dialog-scripting-would-like-to-press-Enter-instead-of/m-p/34808#M20561</link>
      <description>&lt;P&gt;Modal dialog scripting: would like to press Enter instead of Click OK&lt;/P&gt;
&lt;P&gt;I have a modal dialog script with [OK] and [Cancel] buttons where the pre-populated entry is most often accepted rather than typed over.&lt;/P&gt;
&lt;P&gt;I would like to be able to press Enter to accept rather than clicking the OK button to accept.&lt;/P&gt;
&lt;P&gt;Is there an easy way to do this?&lt;/P&gt;
&lt;P&gt;My script right now is&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Window( "Enter Number",
	&amp;lt;&amp;lt;Modal,
	Text Box( "Enter Number" ),
	variablebox = Number Edit Box( UsuallyTheRightNumber ),
	Button Box( "OK" ),
	Button Box( "Cancel" )
);
dt:height[i] = variablebox &amp;lt;&amp;lt; get;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Again, the script is working fine but having to mouse click OK instead of just pressing Enter is a major inconvenience.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Charlie&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 13:00:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Modal-dialog-scripting-would-like-to-press-Enter-instead-of/m-p/34808#M20561</guid>
      <dc:creator>galactus3000</dc:creator>
      <dc:date>2018-07-18T13:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Modal dialog scripting: would like to press Enter instead of Click OK</title>
      <link>https://community.jmp.com/t5/Discussions/Modal-dialog-scripting-would-like-to-press-Enter-instead-of/m-p/34812#M20563</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

nw=New Window(
	"Enter Number",
	&amp;lt;&amp;lt;Modal,
	Text Box( "Enter Number" ),
	variablebox = Number Edit Box(
		,
		10,
		&amp;lt;&amp;lt;SetFunction(
			Function( {this}, /* put my value into my sibling's display */
				variableboxvalue = variablebox &amp;lt;&amp;lt; get;
				nw &amp;lt;&amp;lt; close window;
			)
		)
	)
);
dt:height[i] = variableboxvalue;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Jan 2017 22:38:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Modal-dialog-scripting-would-like-to-press-Enter-instead-of/m-p/34812#M20563</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-01-20T22:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: Modal dialog scripting: would like to press Enter instead of Click OK</title>
      <link>https://community.jmp.com/t5/Discussions/Modal-dialog-scripting-would-like-to-press-Enter-instead-of/m-p/34813#M20564</link>
      <description>&lt;P&gt;Could also just make the function click the button for you. &amp;nbsp;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. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Window( "Enter Number",
	&amp;lt;&amp;lt;Modal,
	Text Box( "Enter Number" ),
	variablebox = Number Edit Box( 14,  10,
		&amp;lt;&amp;lt;Set Function(
			Function({this}, 
				btn_ok &amp;lt;&amp;lt; Click
			)
		)
	),
	btn_ok = Button Box( "OK", 
		x = variablebox &amp;lt;&amp;lt; get;
	),
	Button Box( "Cancel" )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2017 23:47:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Modal-dialog-scripting-would-like-to-press-Enter-instead-of/m-p/34813#M20564</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2017-01-20T23:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Modal dialog scripting: would like to press Enter instead of Click OK</title>
      <link>https://community.jmp.com/t5/Discussions/Modal-dialog-scripting-would-like-to-press-Enter-instead-of/m-p/34814#M20565</link>
      <description>&lt;P&gt;Just to confirm:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;nw = New Window( "Enter Number",
	&amp;lt;&amp;lt;Modal,
	Text Box( "Enter Number" ),
	variablebox = Number Edit Box(
		,
		UsuallyTheRightNumber,
		&amp;lt;&amp;lt;SetFunction(
			Function( {this}, /* put my value into my sibling's display */
				variableboxvalue = variablebox &amp;lt;&amp;lt; get;
				nw &amp;lt;&amp;lt; close window;
			)
		)
	)
);
dt:height[i] = variableboxvalue;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;Or does the number 10 have a special significance?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 13:01:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Modal-dialog-scripting-would-like-to-press-Enter-instead-of/m-p/34814#M20565</guid>
      <dc:creator>galactus3000</dc:creator>
      <dc:date>2018-07-18T13:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Modal dialog scripting: would like to press Enter instead of Click OK</title>
      <link>https://community.jmp.com/t5/Discussions/Modal-dialog-scripting-would-like-to-press-Enter-instead-of/m-p/34815#M20566</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;What are the significance of 14 and 10 here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jan 2017 00:05:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Modal-dialog-scripting-would-like-to-press-Enter-instead-of/m-p/34815#M20566</guid>
      <dc:creator>galactus3000</dc:creator>
      <dc:date>2017-01-21T00:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Modal dialog scripting: would like to press Enter instead of Click OK</title>
      <link>https://community.jmp.com/t5/Discussions/Modal-dialog-scripting-would-like-to-press-Enter-instead-of/m-p/34816#M20567</link>
      <description>&lt;P&gt;14 is just the default number. &amp;nbsp;10 is the width of the box. &amp;nbsp;depending on version of JMP if you don't put in a width it does some funky stuff. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jan 2017 00:14:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Modal-dialog-scripting-would-like-to-press-Enter-instead-of/m-p/34816#M20567</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2017-01-21T00:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Modal dialog scripting: would like to press Enter instead of Click OK</title>
      <link>https://community.jmp.com/t5/Discussions/Modal-dialog-scripting-would-like-to-press-Enter-instead-of/m-p/34817#M20568</link>
      <description>&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jan 2017 00:15:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Modal-dialog-scripting-would-like-to-press-Enter-instead-of/m-p/34817#M20568</guid>
      <dc:creator>galactus3000</dc:creator>
      <dc:date>2017-01-21T00:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: Modal dialog scripting: would like to press Enter instead of Click OK</title>
      <link>https://community.jmp.com/t5/Discussions/Modal-dialog-scripting-would-like-to-press-Enter-instead-of/m-p/34820#M20570</link>
      <description>&lt;P&gt;Just to complete the education on this topic, the documentation on the format and functions of the Number Edit Box is available at:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Help==&amp;gt;Scripting Index==&amp;gt;Number Edit Box&lt;/P&gt;
&lt;P&gt;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&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Number Edit Box.PNG" style="width: 914px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/4891i631213B12DB9FE24/image-size/large?v=v2&amp;amp;px=999" role="button" title="Number Edit Box.PNG" alt="Number Edit Box.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jan 2017 01:49:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Modal-dialog-scripting-would-like-to-press-Enter-instead-of/m-p/34820#M20570</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-01-21T01:49:05Z</dc:date>
    </item>
  </channel>
</rss>

