<?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: Open() , save and close while script is running in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Open-save-and-close-while-script-is-running/m-p/512570#M74011</link>
    <description>&lt;P&gt;Could hiding the window work (make it invisible). Then if you need to make it visible you can use &amp;lt;&amp;lt; Show Window(1);.&lt;/P&gt;
&lt;P&gt;Here is how to set invisible directly in Open function, but I think this requires you to have the path&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp", invisible);
wait(2);
dt &amp;lt;&amp;lt; Show Window(1);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In your case you might have to first let the table open as visible and then use &amp;lt;&amp;lt; Show Window(0); to hide it&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open();
dt &amp;lt;&amp;lt; Show Window(0);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Even better might be using file_path = Pick File with Open(file_path, invisible):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt_path = Pick File("Select JMP File",
	"",
	{"JMP Files|jmp"}
);
If(!IsMissing(dt_path),
	dt1 = Open(dt_path, invisible);
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;LI-SPOILER&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt2 = Current Data Table();
nw = New Window("New window",
	&amp;lt;&amp;lt;modal(),
	Text Box(
		"Tests", 
			
		&amp;lt;&amp;lt;Set Font Style("Bold"),
		&amp;lt;&amp;lt;Set Wrap(1000)
	), 
	
	Spacer Box(Size(20, 20)), 
               
	H List Box(
		Panel Box("Input JMP file",
			Button Box("Select file", 
			dt_path = Pick File("Select JMP File",
				"",
				{"JMP Files|jmp"}
			);
			If(!IsMissing(dt_path),
				dt1 = Open(dt_path, invisible);
			);
				,&amp;lt;&amp;lt;setIcon("ListItemAdd")
			) // Can I use close window syntax? here
		)
	),
	Spacer Box(Size(20, 10)),
	Panel Box("Actions", 

		H List Box(
			align(center), 

			Button Box("OK",
				keep_going = 1;
				todo_list = my_cb &amp;lt;&amp;lt; get selected;,
				&amp;lt;&amp;lt;setIcon("CheckCircle")
			), 

			Button Box("Cancel", keep_going = 0, &amp;lt;&amp;lt;setIcon("ErrorSmall"))

		), 

	),
	&amp;lt;&amp;lt;Size Window(340, 430)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI-SPOILER&gt;</description>
    <pubDate>Wed, 22 Jun 2022 19:28:17 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2022-06-22T19:28:17Z</dc:date>
    <item>
      <title>Open() , save and close while script is running</title>
      <link>https://community.jmp.com/t5/Discussions/Open-save-and-close-while-script-is-running/m-p/512537#M74010</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way I could open the data table, save in the variable and close it while the script is running? It's annoying sometimes because the input data table will pop up. I tried using close window, close() but they didn't seem to work.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
Clear Globals();
Clear Log();
dt2 = Current Data Table();
nw = New Window( "New window",
			&amp;lt;&amp;lt;modal(),
			Text Box(
				"Tests", 
			
				&amp;lt;&amp;lt;Set Font Style( "Bold" ),
				&amp;lt;&amp;lt;Set Wrap( 1000 )
			), 
	
			Spacer Box( Size( 20, 20 ) ), 
               
			H List Box(
				Panel Box( "Input JMP file",
					&amp;lt;&amp;lt;set font style( "Bold" ),
					Button Box( "Select file", dt1 = Open(), &amp;lt;&amp;lt;setIcon( "ListItemAdd" ) ) // Can I use close window syntax? here
				)),
				Spacer Box( Size( 20, 10 ) ),
			Panel Box( "Actions", 

				H List Box(
					align( center ), 

					Button Box( "OK", 
						keep_going = 1;
						todo_list = my_cb &amp;lt;&amp;lt; get selected, &amp;lt;&amp;lt;setIcon( "CheckCircle" );
					), 

					Button Box( "Cancel", keep_going = 0, &amp;lt;&amp;lt;setIcon( "ErrorSmall" ))

				), 

			),
			&amp;lt;&amp;lt;Size Window( 340, 430 )
		);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:02:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-save-and-close-while-script-is-running/m-p/512537#M74010</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2023-06-09T17:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: Open() , save and close while script is running</title>
      <link>https://community.jmp.com/t5/Discussions/Open-save-and-close-while-script-is-running/m-p/512570#M74011</link>
      <description>&lt;P&gt;Could hiding the window work (make it invisible). Then if you need to make it visible you can use &amp;lt;&amp;lt; Show Window(1);.&lt;/P&gt;
&lt;P&gt;Here is how to set invisible directly in Open function, but I think this requires you to have the path&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp", invisible);
wait(2);
dt &amp;lt;&amp;lt; Show Window(1);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In your case you might have to first let the table open as visible and then use &amp;lt;&amp;lt; Show Window(0); to hide it&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open();
dt &amp;lt;&amp;lt; Show Window(0);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Even better might be using file_path = Pick File with Open(file_path, invisible):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt_path = Pick File("Select JMP File",
	"",
	{"JMP Files|jmp"}
);
If(!IsMissing(dt_path),
	dt1 = Open(dt_path, invisible);
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;LI-SPOILER&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt2 = Current Data Table();
nw = New Window("New window",
	&amp;lt;&amp;lt;modal(),
	Text Box(
		"Tests", 
			
		&amp;lt;&amp;lt;Set Font Style("Bold"),
		&amp;lt;&amp;lt;Set Wrap(1000)
	), 
	
	Spacer Box(Size(20, 20)), 
               
	H List Box(
		Panel Box("Input JMP file",
			Button Box("Select file", 
			dt_path = Pick File("Select JMP File",
				"",
				{"JMP Files|jmp"}
			);
			If(!IsMissing(dt_path),
				dt1 = Open(dt_path, invisible);
			);
				,&amp;lt;&amp;lt;setIcon("ListItemAdd")
			) // Can I use close window syntax? here
		)
	),
	Spacer Box(Size(20, 10)),
	Panel Box("Actions", 

		H List Box(
			align(center), 

			Button Box("OK",
				keep_going = 1;
				todo_list = my_cb &amp;lt;&amp;lt; get selected;,
				&amp;lt;&amp;lt;setIcon("CheckCircle")
			), 

			Button Box("Cancel", keep_going = 0, &amp;lt;&amp;lt;setIcon("ErrorSmall"))

		), 

	),
	&amp;lt;&amp;lt;Size Window(340, 430)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI-SPOILER&gt;</description>
      <pubDate>Wed, 22 Jun 2022 19:28:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-save-and-close-while-script-is-running/m-p/512570#M74011</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-06-22T19:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Open() , save and close while script is running</title>
      <link>https://community.jmp.com/t5/Discussions/Open-save-and-close-while-script-is-running/m-p/512578#M74012</link>
      <description>&lt;P&gt;It worked. Thanks&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;:)&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 19:39:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-save-and-close-while-script-is-running/m-p/512578#M74012</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2022-06-22T19:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Open() , save and close while script is running</title>
      <link>https://community.jmp.com/t5/Discussions/Open-save-and-close-while-script-is-running/m-p/512586#M74014</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;, Quick question. I am trying to bring the variability chart window in the front or maximize it after clicking on button box "Plot". I tried using bring window to front but it's not working. Can you suggest what other syntax can be use?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my script:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt2 = Open( "$SAMPLE_DATA/Big Class.jmp" );
nw = New Window( "New window",
	&amp;lt;&amp;lt;modal(),
	Text Box(
		"Tests", 
			
		&amp;lt;&amp;lt;Set Font Style( "Bold" ),
		&amp;lt;&amp;lt;Set Wrap( 1000 )
	), 
	
	Spacer Box( Size( 20, 20 ) ), 
               
	H List Box(
		Panel Box( "Input JMP file",
			Button Box( "Select file",
				dt_path = Pick File( "Select JMP File", "", {"JMP Files|jmp"} );
				If( !Is Missing( dt_path ),
					dt1 = Open( dt_path, invisible )
				);,
				&amp;lt;&amp;lt;setIcon( "ListItemAdd" )
			) // Can I use close window syntax? here
		)
	),
	V List Box(
		aa = Panel Box( "Variablity chart",
			Button Box( "   Plot   ",
				vc = dt2 &amp;lt;&amp;lt; Variability Chart(
					Y( :height ),
					X( :sex ),
					Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
					Show Range Bars( 0 ),
					Std Dev Chart( 0 ),
					Points Jittered( 1 )
				);
				aa &amp;lt;&amp;lt; close window;
				vc &amp;lt;&amp;lt; Show window( 1 );
						
						
			,
				&amp;lt;&amp;lt;setIcon( "VariChart" )	
									
									
			)
		)
									
									
									
	)
,
	Spacer Box( Size( 20, 10 ) ),
	Panel Box( "Actions", 

		H List Box(
			align( center ), 

			Button Box( "OK",
				keep_going = 1;
				todo_list = my_cb &amp;lt;&amp;lt; get selected;,
				&amp;lt;&amp;lt;setIcon( "CheckCircle" )
			), 

			Button Box( "Cancel", keep_going = 0, &amp;lt;&amp;lt;setIcon( "ErrorSmall" ) )

		), 

	),
	&amp;lt;&amp;lt;Size Window( 340, 430 )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Jun 2022 20:06:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-save-and-close-while-script-is-running/m-p/512586#M74014</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2022-06-22T20:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: Open() , save and close while script is running</title>
      <link>https://community.jmp.com/t5/Discussions/Open-save-and-close-while-script-is-running/m-p/512833#M74028</link>
      <description>&lt;P&gt;I think you started new topic related to this question (&lt;LI-MESSAGE title="Bring window to front" uid="512595" url="https://community.jmp.com/t5/Discussions/Bring-window-to-front/m-p/512595#U512595" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;) , so we can continue discussion there, most likely related to you using modal window.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 05:36:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-save-and-close-while-script-is-running/m-p/512833#M74028</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-06-23T05:36:53Z</dc:date>
    </item>
  </channel>
</rss>

