<?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: Lock journal through scripting in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Lock-journal-through-scripting/m-p/882016#M104611</link>
    <description>&lt;P&gt;On my computer atleast, this works on JMP 17 but for JMP 18 it failed. Fortunately it looked like a timing problem. This worked:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;text box("abc") &amp;lt;&amp;lt; journal;
jrn = Current Journal();
&lt;STRONG&gt;Wait(0);&lt;/STRONG&gt;
Main Menu( "Lock Journal", jrn &amp;lt;&amp;lt; get window title);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 27 Jun 2025 12:30:26 GMT</pubDate>
    <dc:creator>David_Burnham</dc:creator>
    <dc:date>2025-06-27T12:30:26Z</dc:date>
    <item>
      <title>Lock journal through scripting</title>
      <link>https://community.jmp.com/t5/Discussions/Lock-journal-through-scripting/m-p/419373#M66835</link>
      <description>&lt;P&gt;In recent versions of JMP we now have the option to lock journals. How can I incorpoerate that into my scripts? I expect it to be something like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;current journal() &amp;lt;&amp;lt; lock;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:57:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Lock-journal-through-scripting/m-p/419373#M66835</guid>
      <dc:creator>pauldeen</dc:creator>
      <dc:date>2023-06-09T19:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Lock journal through scripting</title>
      <link>https://community.jmp.com/t5/Discussions/Lock-journal-through-scripting/m-p/777319#M95865</link>
      <description>&lt;P&gt;Did anyone ever find a way to do this? I had the same assumption, that the syntax would be similar to what you put, but it doesn't work. I also tried the following and none of them worked either, all of them result in an error.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;current journal() &amp;lt;&amp;lt; Lock(1);
current journal() &amp;lt;&amp;lt; LockJournal;
current journal() &amp;lt;&amp;lt; LockJournal(1);
current journal() &amp;lt;&amp;lt; SetLock(1);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Error Message:Object 'HeadBox' does not recognize the message '&amp;lt;command&amp;gt;';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did notice if you look at the "Customize" -&amp;gt; "Menus and Toolbars" window, that the "Edit" -&amp;gt; "Lock Journal" menu command has a Built-in Command of "EDIT:LOCK JOURNAL", but I cannot figure out a way to get the script to run the built in command. I tried these but none worked.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Current Journal() &amp;lt;&amp;lt; Main Menu("EDIT:LOCKJOURNAL");
Current Journal() &amp;lt;&amp;lt; Run Script( Main Menu("EDIT:LOCKJOURNAL"); );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Error Message: Object 'HeadBox' does not recognize the message 'Main Menu';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also tried to run this with Journal as active window. Command executes, but doesn't lock the Journal&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Main Menu("EDIT:LOCKJOURNAL");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 23:22:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Lock-journal-through-scripting/m-p/777319#M95865</guid>
      <dc:creator>R2OKeefe</dc:creator>
      <dc:date>2024-07-29T23:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Lock journal through scripting</title>
      <link>https://community.jmp.com/t5/Discussions/Lock-journal-through-scripting/m-p/777403#M95881</link>
      <description>&lt;P&gt;The journal window has to be the active window.&amp;nbsp; This works for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Window( "Journal: Untitled" ) &amp;lt;&amp;lt; Bring Window to Front;
Wait( 0 );
Main Menu( "Lock Journal" );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There's a better way.&amp;nbsp; You can specify the window within the Main Menu() function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Main Menu( "Lock Journal", "Journal: Untitled" );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Jul 2024 12:19:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Lock-journal-through-scripting/m-p/777403#M95881</guid>
      <dc:creator>mmarchandFSLR</dc:creator>
      <dc:date>2024-07-30T12:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Lock journal through scripting</title>
      <link>https://community.jmp.com/t5/Discussions/Lock-journal-through-scripting/m-p/777432#M95885</link>
      <description>&lt;P&gt;Great, and a little more generic with code references that might be used in other parts of the script:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;text box("abc") &amp;lt;&amp;lt; journal;
jrn = Current Journal();
Main Menu( "Lock Journal", jrn &amp;lt;&amp;lt; get window title);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Jul 2024 14:12:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Lock-journal-through-scripting/m-p/777432#M95885</guid>
      <dc:creator>pauldeen</dc:creator>
      <dc:date>2024-07-30T14:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: Lock journal through scripting</title>
      <link>https://community.jmp.com/t5/Discussions/Lock-journal-through-scripting/m-p/882016#M104611</link>
      <description>&lt;P&gt;On my computer atleast, this works on JMP 17 but for JMP 18 it failed. Fortunately it looked like a timing problem. This worked:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;text box("abc") &amp;lt;&amp;lt; journal;
jrn = Current Journal();
&lt;STRONG&gt;Wait(0);&lt;/STRONG&gt;
Main Menu( "Lock Journal", jrn &amp;lt;&amp;lt; get window title);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Jun 2025 12:30:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Lock-journal-through-scripting/m-p/882016#M104611</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2025-06-27T12:30:26Z</dc:date>
    </item>
  </channel>
</rss>

