<?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 Collecting user input via dialog box in a python script? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Collecting-user-input-via-dialog-box-in-a-python-script/m-p/826453#M100746</link>
    <description>&lt;P&gt;I need to add collecting user inputs to an existing older python script (it initially used fixed number and location for files) ... I can get it to somewhat work using the "jmp.run_jsl()" function - it displays the dialog, gets the input and can print it out - but doesn't actually return anything to Python.&amp;nbsp; I've tried the Python Send and Get commands but the variable remains '0'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I started off just using the sample script for a modal dialog and wrapping it in jmp.run_jsl() - and as noted it pops up the dialog but nothing comes back to Python.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assume it would be more efficient to do it in Python but not sure if that is possible (of course the other option is to rewrite in JSL but need the core code portable for other uses).&amp;nbsp; Am I missing something?&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jan 2025 16:09:38 GMT</pubDate>
    <dc:creator>andersonmj2</dc:creator>
    <dc:date>2025-01-09T16:09:38Z</dc:date>
    <item>
      <title>Collecting user input via dialog box in a python script?</title>
      <link>https://community.jmp.com/t5/Discussions/Collecting-user-input-via-dialog-box-in-a-python-script/m-p/826453#M100746</link>
      <description>&lt;P&gt;I need to add collecting user inputs to an existing older python script (it initially used fixed number and location for files) ... I can get it to somewhat work using the "jmp.run_jsl()" function - it displays the dialog, gets the input and can print it out - but doesn't actually return anything to Python.&amp;nbsp; I've tried the Python Send and Get commands but the variable remains '0'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I started off just using the sample script for a modal dialog and wrapping it in jmp.run_jsl() - and as noted it pops up the dialog but nothing comes back to Python.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assume it would be more efficient to do it in Python but not sure if that is possible (of course the other option is to rewrite in JSL but need the core code portable for other uses).&amp;nbsp; Am I missing something?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 16:09:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Collecting-user-input-via-dialog-box-in-a-python-script/m-p/826453#M100746</guid>
      <dc:creator>andersonmj2</dc:creator>
      <dc:date>2025-01-09T16:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: Collecting user input via dialog box in a python script?</title>
      <link>https://community.jmp.com/t5/Discussions/Collecting-user-input-via-dialog-box-in-a-python-script/m-p/826463#M100747</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;import jmp

jmp.run_jsl('''
nw = New Window("", &amp;lt;&amp;lt; modal, 
	teb = Number Edit Box(10),
	Button Box("OK",
		myval = teb &amp;lt;&amp;lt; get;
		Python Send(myval);
	)
);
''');

print(f'{myval=}, myval*100 = {myval*100}');&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Jan 2025 16:23:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Collecting-user-input-via-dialog-box-in-a-python-script/m-p/826463#M100747</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-01-09T16:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Collecting user input via dialog box in a python script?</title>
      <link>https://community.jmp.com/t5/Discussions/Collecting-user-input-via-dialog-box-in-a-python-script/m-p/826464#M100748</link>
      <description>&lt;P&gt;Thanks very much - works perfectly!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 16:52:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Collecting-user-input-via-dialog-box-in-a-python-script/m-p/826464#M100748</guid>
      <dc:creator>andersonmj2</dc:creator>
      <dc:date>2025-01-09T16:52:39Z</dc:date>
    </item>
  </channel>
</rss>

