<?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: CMD window for logging never shows up while using RunProgram in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/CMD-window-for-logging-never-shows-up-while-using-RunProgram/m-p/367477#M61742</link>
    <description>&lt;P&gt;yes, we need a bit more information. Do you interact with&amp;nbsp;get_data_from_cache.exe? Does it open other windows? Does it need to receive an end-of-file of some sort?&lt;/P&gt;&lt;P&gt;The RP variable might already hold the text that would appear in the CMD window, try&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;write(rp);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and see if that's what you want.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you need to type something in the window, RunProgram's writeFunction can supply the text.&lt;/P&gt;&lt;P&gt;Alternatively, you might want to run CMD.EXE and pass it the name of the program to run.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Mar 2021 14:10:41 GMT</pubDate>
    <dc:creator>Craige_Hales</dc:creator>
    <dc:date>2021-03-12T14:10:41Z</dc:date>
    <item>
      <title>CMD window for logging never shows up while using RunProgram</title>
      <link>https://community.jmp.com/t5/Discussions/CMD-window-for-logging-never-shows-up-while-using-RunProgram/m-p/365980#M61553</link>
      <description>&lt;P&gt;I got an issue while using "RunProgram" to call my exe, a CMD window for logging is supposed to appear, but it never shows up.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The CMD window can normally pop up when I manually run it. Is there anyone who can help me solve the issue? Thanks in advance : )&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;JSL code:&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;RP = Run Program(
    Executable(
        exefilepathRoot || "CommonalityEngine\PyScript\get_data_from_cache.exe"
    ),
    Options( Char( CAEngine_Main:ConfigFileName ) ),
    ReadFunction( "text" )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;CMD window can show up while manually running without JSL:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="baiyun_0-1615185404199.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/31089i866FD442D0FC9994/image-size/medium?v=v2&amp;amp;px=400" role="button" title="baiyun_0-1615185404199.png" alt="baiyun_0-1615185404199.png" /&gt;&lt;/span&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 22:07:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/CMD-window-for-logging-never-shows-up-while-using-RunProgram/m-p/365980#M61553</guid>
      <dc:creator>baiyun</dc:creator>
      <dc:date>2023-06-09T22:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: CMD window for logging never shows up while using RunProgram</title>
      <link>https://community.jmp.com/t5/Discussions/CMD-window-for-logging-never-shows-up-while-using-RunProgram/m-p/367112#M61705</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/25096"&gt;@baiyun&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are you hoping to do with that window once it opens? The Run Program feature intentionally doesn't show the user interface as it is intended to let you control that program entirely via scripting.&amp;nbsp; Most likely, what you want to do in that CMD window, you would instead do in JMP, and let JMP pass those instructions to the program via read and write functions.&lt;BR /&gt;&lt;BR /&gt;This link might help you get started:&lt;BR /&gt;&lt;A href="https://www.jmp.com/support/help/en/15.2/jmp/run-external-programs.shtml" target="_blank"&gt;https://www.jmp.com/support/help/en/15.2/jmp/run-external-programs.shtml&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 13:37:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/CMD-window-for-logging-never-shows-up-while-using-RunProgram/m-p/367112#M61705</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2021-03-11T13:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: CMD window for logging never shows up while using RunProgram</title>
      <link>https://community.jmp.com/t5/Discussions/CMD-window-for-logging-never-shows-up-while-using-RunProgram/m-p/367477#M61742</link>
      <description>&lt;P&gt;yes, we need a bit more information. Do you interact with&amp;nbsp;get_data_from_cache.exe? Does it open other windows? Does it need to receive an end-of-file of some sort?&lt;/P&gt;&lt;P&gt;The RP variable might already hold the text that would appear in the CMD window, try&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;write(rp);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and see if that's what you want.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you need to type something in the window, RunProgram's writeFunction can supply the text.&lt;/P&gt;&lt;P&gt;Alternatively, you might want to run CMD.EXE and pass it the name of the program to run.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 14:10:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/CMD-window-for-logging-never-shows-up-while-using-RunProgram/m-p/367477#M61742</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2021-03-12T14:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: CMD window for logging never shows up while using RunProgram</title>
      <link>https://community.jmp.com/t5/Discussions/CMD-window-for-logging-never-shows-up-while-using-RunProgram/m-p/369392#M61911</link>
      <description>Hi ih,&lt;BR /&gt;Thanks for your solution. I want the user to see that window because there is log printed on that window.</description>
      <pubDate>Fri, 19 Mar 2021 02:52:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/CMD-window-for-logging-never-shows-up-while-using-RunProgram/m-p/369392#M61911</guid>
      <dc:creator>baiyun</dc:creator>
      <dc:date>2021-03-19T02:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: CMD window for logging never shows up while using RunProgram</title>
      <link>https://community.jmp.com/t5/Discussions/CMD-window-for-logging-never-shows-up-while-using-RunProgram/m-p/369642#M61932</link>
      <description>&lt;P&gt;It sounds like&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/982"&gt;@Craige_Hales&lt;/a&gt;&amp;nbsp;might be right then in that your variable rp might already have that log info.&amp;nbsp; Try running 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);
RP = Run Program(
    Executable(
        exefilepathRoot || "CommonalityEngine\PyScript\get_data_from_cache.exe"
    ),
    Options( Char( CAEngine_Main:ConfigFileName ) ),
    ReadFunction( "text" )
);
New Window("Output", text box(RP));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or, here is an example anyone on windows can run:&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);
rp = Run Program(
	Executable( "cmd.exe" ),
	Options( {"/c", "TaskList\!n"} ),
	Read Function( "text" ) // returns all text
);
New Window("Output", text box(rp));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Mar 2021 13:54:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/CMD-window-for-logging-never-shows-up-while-using-RunProgram/m-p/369642#M61932</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2021-03-19T13:54:00Z</dc:date>
    </item>
  </channel>
</rss>

