<?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 Open file and continue script in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Open-file-and-continue-script/m-p/264084#M51520</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In a script I´m prompting a user to open a file:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;LBSelect = Open( "file path", 
	Use Labels For Var Names( 1 )
	);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This opens a folder and the user has to pick the correct file.&amp;nbsp;When the file has been opened the script should continue with a series of actions based on that file.&lt;/P&gt;&lt;P&gt;How can I make the script wait until a file has been opened? I thought about wait() but that will just state how many seconds it has to wait and as these files tend to be very big this is not a good fit.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I make it wait for the file to open?&lt;/P&gt;&lt;P&gt;Can a modal window be used in any way?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Br Julie&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 May 2020 15:16:49 GMT</pubDate>
    <dc:creator>JulieSAppel</dc:creator>
    <dc:date>2020-05-04T15:16:49Z</dc:date>
    <item>
      <title>Open file and continue script</title>
      <link>https://community.jmp.com/t5/Discussions/Open-file-and-continue-script/m-p/264084#M51520</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In a script I´m prompting a user to open a file:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;LBSelect = Open( "file path", 
	Use Labels For Var Names( 1 )
	);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This opens a folder and the user has to pick the correct file.&amp;nbsp;When the file has been opened the script should continue with a series of actions based on that file.&lt;/P&gt;&lt;P&gt;How can I make the script wait until a file has been opened? I thought about wait() but that will just state how many seconds it has to wait and as these files tend to be very big this is not a good fit.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I make it wait for the file to open?&lt;/P&gt;&lt;P&gt;Can a modal window be used in any way?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Br Julie&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 15:16:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-file-and-continue-script/m-p/264084#M51520</guid>
      <dc:creator>JulieSAppel</dc:creator>
      <dc:date>2020-05-04T15:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Open file and continue script</title>
      <link>https://community.jmp.com/t5/Discussions/Open-file-and-continue-script/m-p/264100#M51522</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a couple of ideas.&lt;/P&gt;
&lt;P&gt;1. try to use wait() with no number inside. It will wait until all previous commands are complete (I hope it is true)&lt;/P&gt;
&lt;P&gt;2. make a loop with wait and try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For( i = 1, i &amp;lt;= 100, i++, 
	Try(
		LBSelect &amp;lt;&amp;lt; Bring Window to front();//run any command on table which will fail in case the table is not ready
		Break();//if not failed - terminate the loop
	,
		Wait( 1 )
	);//if failed - wait 1 second and try again

);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 19:51:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-file-and-continue-script/m-p/264100#M51522</guid>
      <dc:creator>tom_abramov</dc:creator>
      <dc:date>2020-05-04T19:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Open file and continue script</title>
      <link>https://community.jmp.com/t5/Discussions/Open-file-and-continue-script/m-p/264105#M51523</link>
      <description>&lt;P&gt;You are confused. The &lt;STRONG&gt;Open()&lt;/STRONG&gt; function opens a file. The &lt;STRONG&gt;Pick File()&lt;/STRONG&gt; function presents a dialog and returns a full path to the selected file or missing. So you should call the &lt;STRONG&gt;Pick File()&lt;/STRONG&gt; function and use the result to open the file with the &lt;STRONG&gt;Open()&lt;/STRONG&gt; function, or call the &lt;STRONG&gt;Open()&lt;/STRONG&gt; function without a path.&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 15:33:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-file-and-continue-script/m-p/264105#M51523</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2020-05-04T15:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Open file and continue script</title>
      <link>https://community.jmp.com/t5/Discussions/Open-file-and-continue-script/m-p/264143#M51533</link>
      <description>&lt;P&gt;Ok - I can see that.&lt;/P&gt;&lt;P&gt;Normally I do that when I prompt for a user to open a file (where they navigate to the file themselves). In this case I wanted to add the file path in there to reduce the amount of clicks and then I managed to confuse myself.&lt;/P&gt;&lt;P&gt;Now I´ve done this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;path = Pick File("Select lb", "file path");

LBSelect = Open( path, 
	Use Labels For Var Names( 1 )
	);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But it doesn´t seem to work. The lb file is opened as lb, not as LBSelect.&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 17:31:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-file-and-continue-script/m-p/264143#M51533</guid>
      <dc:creator>JulieSAppel</dc:creator>
      <dc:date>2020-05-04T17:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Open file and continue script</title>
      <link>https://community.jmp.com/t5/Discussions/Open-file-and-continue-script/m-p/264148#M51535</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Wait(0)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;... is a common method of waiting until a task is completed.&amp;nbsp; Not sure I've ever had to use it in the context of opening files.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 17:51:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-file-and-continue-script/m-p/264148#M51535</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2020-05-04T17:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Open file and continue script</title>
      <link>https://community.jmp.com/t5/Discussions/Open-file-and-continue-script/m-p/441330#M68968</link>
      <description>&lt;P&gt;Are you looking something like this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

New Window( "Data and Limits file",
	&amp;lt;&amp;lt;modal,
	Spacer Box( size( 10, 10 ) ),
	Text Box( "Choose a data file:" ),
	BB1 = Button Box( "Pick file",
		D = Pick File();
		If( D != "",
			file1 &amp;lt;&amp;lt; set text( D )
		);
	),
	file1 = Text Box( ), 

);

data_file = Open (D);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Dec 2021 21:20:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-file-and-continue-script/m-p/441330#M68968</guid>
      <dc:creator>singaraveluR</dc:creator>
      <dc:date>2021-12-01T21:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Open file and continue script</title>
      <link>https://community.jmp.com/t5/Discussions/Open-file-and-continue-script/m-p/804656#M98237</link>
      <description>&lt;P&gt;It's better if you do something like this maybe? See the bold text, and then everything else is just optional, based on what I needed to do with my data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Open(&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Pick File(),&lt;/STRONG&gt;&lt;BR /&gt;Worksheets( "Data" ),&lt;BR /&gt;Use for all sheets( 1 ),&lt;BR /&gt;Concatenate Worksheets( 0 ),&lt;BR /&gt;Create Concatenation Column( 0 ),&lt;BR /&gt;Worksheet Settings(&lt;BR /&gt;1,&lt;BR /&gt;Has Column Headers( 1 ),&lt;BR /&gt;Number of Rows in Headers( 4 ),&lt;BR /&gt;Headers Start on Row( 21 ),&lt;BR /&gt;Data Starts on Row( 25 ),&lt;BR /&gt;Data Starts on Column( 1 ),&lt;BR /&gt;Data Ends on Row( 0 ),&lt;BR /&gt;Data Ends on Column( 0 ),&lt;BR /&gt;Replicated Spanned Rows( 1 ),&lt;BR /&gt;Replicated Spanned Headers( 0 ),&lt;BR /&gt;Suppress Hidden Rows( 1 ),&lt;BR /&gt;Suppress Hidden Columns( 1 ),&lt;BR /&gt;Suppress Empty Columns( 1 ),&lt;BR /&gt;Treat as Hierarchy( 0 ),&lt;BR /&gt;Multiple Series Stack( 0 ),&lt;BR /&gt;Import Cell Colors( 0 ),&lt;BR /&gt;Limit Column Detect( 0 ),&lt;BR /&gt;Column Separator String( "-" )&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 10:33:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-file-and-continue-script/m-p/804656#M98237</guid>
      <dc:creator>DJM</dc:creator>
      <dc:date>2024-10-10T10:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Open file and continue script</title>
      <link>https://community.jmp.com/t5/Discussions/Open-file-and-continue-script/m-p/804657#M98238</link>
      <description>&lt;P&gt;So basically this...&lt;BR /&gt;&lt;BR /&gt;Open(&lt;BR /&gt;Pick File(),&lt;BR /&gt;.....&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 10:34:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-file-and-continue-script/m-p/804657#M98238</guid>
      <dc:creator>DJM</dc:creator>
      <dc:date>2024-10-10T10:34:14Z</dc:date>
    </item>
  </channel>
</rss>

