<?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 check whther a project is already open in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/check-whther-a-project-is-already-open/m-p/717996#M89968</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a script which is part of an add-in. When the script is launched, it triggers the creation of a project (project=new project (...)). However, when I'm debugging the script, I typically run it with a project already open and use the code project=this project().&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to make the script smarter so that if a project(s) is already open then it run automatically into the open project (or ask which project to run it into, or give the option to create a new script). if no project is open then it would first create a project.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sugestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jan 2024 19:13:55 GMT</pubDate>
    <dc:creator>Sburel</dc:creator>
    <dc:date>2024-01-19T19:13:55Z</dc:date>
    <item>
      <title>check whther a project is already open</title>
      <link>https://community.jmp.com/t5/Discussions/check-whther-a-project-is-already-open/m-p/717996#M89968</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a script which is part of an add-in. When the script is launched, it triggers the creation of a project (project=new project (...)). However, when I'm debugging the script, I typically run it with a project already open and use the code project=this project().&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to make the script smarter so that if a project(s) is already open then it run automatically into the open project (or ask which project to run it into, or give the option to create a new script). if no project is open then it would first create a project.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sugestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 19:13:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/check-whther-a-project-is-already-open/m-p/717996#M89968</guid>
      <dc:creator>Sburel</dc:creator>
      <dc:date>2024-01-19T19:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: check whther a project is already open</title>
      <link>https://community.jmp.com/t5/Discussions/check-whther-a-project-is-already-open/m-p/717999#M89969</link>
      <description>&lt;P&gt;&lt;A href="https://www.jmp.com/support/help/en/17.2/#page/jmp/display-functions.shtml?os=win&amp;amp;source=application#ww7044382" target="_blank" rel="noopener"&gt;Get Project List()&lt;/A&gt; might be what you are looking for. You can check if there are any projects open for example by checking the list returned from Get Project List() with N Items().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example from scripting index&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
New Project();
Open("$SAMPLE_PROJECTS/Big Class.jmpprj");
                             
Print(Get Project List() &amp;lt;&amp;lt; Get Window Title());&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Jan 2024 19:18:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/check-whther-a-project-is-already-open/m-p/717999#M89969</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-01-19T19:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: check whther a project is already open</title>
      <link>https://community.jmp.com/t5/Discussions/check-whther-a-project-is-already-open/m-p/718020#M89976</link>
      <description>&lt;P&gt;Thanks for the tip. I'll give it a go&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jan 2024 01:07:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/check-whther-a-project-is-already-open/m-p/718020#M89976</guid>
      <dc:creator>Sburel</dc:creator>
      <dc:date>2024-01-20T01:07:50Z</dc:date>
    </item>
  </channel>
</rss>

