<?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: Autorun a &amp;quot;Set preferences&amp;quot; script in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Autorun-a-quot-Set-preferences-quot-script/m-p/530857#M75402</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/17126"&gt;@Elofar&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try starting your script with //!, and at the end of your script include a window indicating it was successful.&amp;nbsp; That way if someone opens the file it will run automatically.&amp;nbsp; You can do all sorts of formatting to make the window look nicer, or you could launch the window first and ask the user if they want to adjust their preferences by including your script in a button box.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//!

//set preferences here

new window("Success", text box("It worked."));
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Aug 2022 13:33:56 GMT</pubDate>
    <dc:creator>ih</dc:creator>
    <dc:date>2022-08-05T13:33:56Z</dc:date>
    <item>
      <title>Autorun a "Set preferences" script</title>
      <link>https://community.jmp.com/t5/Discussions/Autorun-a-quot-Set-preferences-quot-script/m-p/530842#M75400</link>
      <description>&lt;P&gt;Hello dear Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I spent lot of time to set-up my JMP preferences by changing the font size, aligning with corporate colors for the graphs etc ...&lt;/P&gt;&lt;P&gt;I would like now to create an auto-run script so that every employees of my company can quickly have the same preferences without having a heart attack by opening a JSL file ;)&lt;/img&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's what I did:&lt;/P&gt;&lt;P&gt;- Got my preferences with "Get preferences (all)" as well as "Get&amp;nbsp;Platform Preferences"&lt;/P&gt;&lt;P&gt;- I just copied/pasted that into a new script with "Set Preferences" and "Set Platform Preferences"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here's what I would like:&lt;/P&gt;&lt;P&gt;- A way to auto-run the script when double-clicking on it (without the operator seeing the script, like closing right away)&lt;/P&gt;&lt;P&gt;- and even ideally, to display a message "Preference correctly installed" to confirm the set-up&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea how to do that ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS: I'm working on Windows, JMP16&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:06:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Autorun-a-quot-Set-preferences-quot-script/m-p/530842#M75400</guid>
      <dc:creator>Elofar</dc:creator>
      <dc:date>2023-06-09T17:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: Autorun a "Set preferences" script</title>
      <link>https://community.jmp.com/t5/Discussions/Autorun-a-quot-Set-preferences-quot-script/m-p/530857#M75402</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/17126"&gt;@Elofar&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try starting your script with //!, and at the end of your script include a window indicating it was successful.&amp;nbsp; That way if someone opens the file it will run automatically.&amp;nbsp; You can do all sorts of formatting to make the window look nicer, or you could launch the window first and ask the user if they want to adjust their preferences by including your script in a button box.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//!

//set preferences here

new window("Success", text box("It worked."));
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 13:33:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Autorun-a-quot-Set-preferences-quot-script/m-p/530857#M75402</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2022-08-05T13:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: Autorun a "Set preferences" script</title>
      <link>https://community.jmp.com/t5/Discussions/Autorun-a-quot-Set-preferences-quot-script/m-p/531350#M75451</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/6657"&gt;@ih&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I indeed&amp;nbsp;found this "//!" trick before posting but it was not working, I just realized that it actually really needs to be on the very first line of the script and just adding a comment before will not work...&lt;/P&gt;&lt;P&gt;That is exactly what I needed with the window as well, brilliant, thanks a lot !! :)&lt;/img&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 09:26:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Autorun-a-quot-Set-preferences-quot-script/m-p/531350#M75451</guid>
      <dc:creator>Elofar</dc:creator>
      <dc:date>2022-08-08T09:26:33Z</dc:date>
    </item>
  </channel>
</rss>

