<?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: How does JSL get the file name of an image already opened with JMP? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-does-JSL-get-the-file-name-of-an-image-already-opened-with/m-p/773214#M95403</link>
    <description>&lt;P&gt;You know the name of the image if you are opening it -&amp;gt; get it from the filename/path.&amp;nbsp;There isn't a window when you use Open() on image, it will just return the image object (at least doesn't seem to create a window in JMP17/JMP18 when run from script editor).&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1721104869276.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/66206iB213308277975184/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1721104869276.png" alt="jthi_1-1721104869276.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;But you can send &amp;lt;&amp;lt; Get Path to that&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
img = Open("$SAMPLE_IMAGES/windmap.png", "png");
//Show(Get Window List() &amp;lt;&amp;lt; get window title, img &amp;lt;&amp;lt; Get Path);
nw = New Window(img &amp;lt;&amp;lt; Get Path,
	img
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And if you have already open windows, Get Window List() &amp;lt;&amp;lt; Get Window Title works but you might not know which is your image (last opened window is the last in list).&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jul 2024 04:47:14 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2024-07-16T04:47:14Z</dc:date>
    <item>
      <title>How does JSL get the file name of an image already opened with JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-get-the-file-name-of-an-image-already-opened-with/m-p/773186#M95398</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//img=Open("$SAMPLE_IMAGES/tile.jpg");
pp= Current Window();
na=pp &amp;lt;&amp;lt; Window Class Name();//？？&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Jul 2024 00:25:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-get-the-file-name-of-an-image-already-opened-with/m-p/773186#M95398</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-07-16T00:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: How does JSL get the file name of an image already opened with JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-get-the-file-name-of-an-image-already-opened-with/m-p/773196#M95399</link>
      <description>&lt;P&gt;I am not sure what you mean when you specify "an image".&amp;nbsp; Is this a displayed data table window?&amp;nbsp; Or is it the output from JMP Platform?&amp;nbsp; Or is it an actual image display of a .jpg or .png file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;&amp;lt; Get Path will give you the full file name of the data table.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
path = dt &amp;lt;&amp;lt; Get Path();
Show( path );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;lt;&amp;lt; Get Datatable will return the name of the data table associated with the Display Output from a JMP Platform.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
obj = dt &amp;lt;&amp;lt; Distribution( Column( :Age, :Weight ) );
t = obj &amp;lt;&amp;lt; Get Datatable;
Show( N Rows( t ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Jul 2024 01:38:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-get-the-file-name-of-an-image-already-opened-with/m-p/773196#M95399</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-07-16T01:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: How does JSL get the file name of an image already opened with JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-get-the-file-name-of-an-image-already-opened-with/m-p/773209#M95401</link>
      <description>&lt;P&gt;Thank Jim!&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;I just get the picture window title like this JSL&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Open( "$SAMPLE_IMAGES/tile.jpg" );

pp = Current Window();
na = pp &amp;lt;&amp;lt; Window Class Name();//？？&lt;/CODE&gt;&lt;/PRE&gt;&lt;P class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-07-16_11-02-17.png" style="width: 656px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/66203i885BB97FF80F02C5/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-07-16_11-02-17.png" alt="2024-07-16_11-02-17.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 16 Jul 2024 03:03:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-get-the-file-name-of-an-image-already-opened-with/m-p/773209#M95401</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-07-16T03:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: How does JSL get the file name of an image already opened with JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-get-the-file-name-of-an-image-already-opened-with/m-p/773211#M95402</link>
      <description>&lt;P&gt;OK&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-07-16_11-18-06.png" style="width: 472px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/66204iF069A89E0864B8B5/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-07-16_11-18-06.png" alt="2024-07-16_11-18-06.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 03:19:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-get-the-file-name-of-an-image-already-opened-with/m-p/773211#M95402</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-07-16T03:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: How does JSL get the file name of an image already opened with JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-get-the-file-name-of-an-image-already-opened-with/m-p/773214#M95403</link>
      <description>&lt;P&gt;You know the name of the image if you are opening it -&amp;gt; get it from the filename/path.&amp;nbsp;There isn't a window when you use Open() on image, it will just return the image object (at least doesn't seem to create a window in JMP17/JMP18 when run from script editor).&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1721104869276.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/66206iB213308277975184/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1721104869276.png" alt="jthi_1-1721104869276.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;But you can send &amp;lt;&amp;lt; Get Path to that&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
img = Open("$SAMPLE_IMAGES/windmap.png", "png");
//Show(Get Window List() &amp;lt;&amp;lt; get window title, img &amp;lt;&amp;lt; Get Path);
nw = New Window(img &amp;lt;&amp;lt; Get Path,
	img
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And if you have already open windows, Get Window List() &amp;lt;&amp;lt; Get Window Title works but you might not know which is your image (last opened window is the last in list).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 04:47:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-get-the-file-name-of-an-image-already-opened-with/m-p/773214#M95403</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-07-16T04:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: How does JSL get the file name of an image already opened with JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-get-the-file-name-of-an-image-already-opened-with/m-p/773229#M95407</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I opened the png file with JMP by default, so I need to get the name this way.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-07-16_13-14-05.png" style="width: 426px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/66208i067ECC6747D0AE7C/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-07-16_13-14-05.png" alt="2024-07-16_13-14-05.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 05:16:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-get-the-file-name-of-an-image-already-opened-with/m-p/773229#M95407</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-07-16T05:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: How does JSL get the file name of an image already opened with JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-get-the-file-name-of-an-image-already-opened-with/m-p/773230#M95408</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;名= Get Window List() &amp;lt;&amp;lt; Get Window Title();i=1;For(i=1,i&amp;lt;=NItems(名),i++,aa=名[i];if(right(aa,3)=="jpg"|right(aa,3)=="png",pp=left(aa,length(aa)-4);Break()));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Jul 2024 05:19:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-get-the-file-name-of-an-image-already-opened-with/m-p/773230#M95408</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-07-16T05:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: How does JSL get the file name of an image already opened with JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-get-the-file-name-of-an-image-already-opened-with/m-p/773231#M95409</link>
      <description>&lt;P&gt;Using Word() or Words() can usually make getting filenames a bit easier. This will return all the window titles which end in "jpg", "jpeg" or "png"&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;pngs = Filter Each({windowtitle}, Get Window List() &amp;lt;&amp;lt; Get Window Title,
	Ends With({"jpg", "jpeg", "png"}, Word(-1, windowtitle, "."))
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Jul 2024 05:33:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-get-the-file-name-of-an-image-already-opened-with/m-p/773231#M95409</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-07-16T05:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: How does JSL get the file name of an image already opened with JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-does-JSL-get-the-file-name-of-an-image-already-opened-with/m-p/773233#M95411</link>
      <description>&lt;P&gt;Thank jthi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Each()&lt;/LI-CODE&gt;&lt;P&gt;It not work in jmp 14&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 06:04:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-does-JSL-get-the-file-name-of-an-image-already-opened-with/m-p/773233#M95411</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-07-16T06:04:56Z</dc:date>
    </item>
  </channel>
</rss>

