Automatic inclusion of Names Default to Here( 1 ) when new script window is openedI would like to see a new preference added to the Script Editor preferences. I would simply provide a check box that when checked would automatically add the namespace specification of
Names Default to Here( 1 );
as the first line in the script, when a new script window is requested.
ScriptingRe: Automatic inclusion of Names Default to Here( 1 ) when new script window is openedThanks Sam......
Re: Automatic inclusion of Names Default to Here( 1 ) when new script window is opened - Status changed to: InvestigatingWe are taking a closer look at this idea and we will provide an update when we have more information.
Re: Automatic inclusion of Names Default to Here( 1 ) when new script window is openedRegardless of the other solutions here which I think would be good for advanced users, I like the idea of having a preference to for the names default to here that would help those who are new to scripting.
Re: Automatic inclusion of Names Default to Here( 1 ) when new script window is openedI just have my own script mapped to Ctrl+T
<jm:menu_and_toolbar_customizations xmlns:jm="http://www.jmp.com/ns/menu" version="3">
<jm:insert_in_main_menu>
<jm:insert_in_menu>
<jm:name>FILE</jm:name>
<jm:insert_in_menu>
<jm:name>NEW</jm:name>
<jm:customization target="SCRIPT">
<jm:accel>Ctrl+Shift+T</jm:accel>
</jm:customization>
<jm:insert_after>
<jm:name>SCRIPT</jm:name>
<jm:command>
<jm:name>HERESCRIPT</jm:name>
<jm:caption>HereScript</jm:caption>
<jm:action type="text">new window("Script", <<script("Names default to here(1);\!n"));</jm:action>
<jm:accel>Ctrl+T</jm:accel>
<jm:icon type="none"></jm:icon>
</jm:command>
<jm:command>
<jm:name>BIGCLASS</jm:name>
<jm:caption>BigClass</jm:caption>
<jm:action type="text">new window("Script", <<script("Names default to here( 1 );\!ndt = open(\!"$SAMPLE_DATA\Big Class.jmp\!");\!n"));</jm:action>
<jm:accel>Ctrl+Shift+B</jm:accel>
<jm:icon type="none"></jm:icon>
</jm:command>
</jm:insert_after>
</jm:insert_in_menu>
</jm:insert_in_menu>
</jm:insert_in_main_menu>
</jm:menu_and_toolbar_customizations>Re: Automatic inclusion of Names Default to Here( 1 ) when new script window is openedI have created request for creating scripts directly from template. It was forwarded to R&D but no idea what happened to it after that as it has been Closed. That ticket was opened 24.02.2021.
My request was (Tracking ID: 7613288873):
Questions:
Topic: General usage
Subtopic: Feature Request
Details:
Would it be possible to add new feature to JMP (for Script Editor) which would allow starting new scripts
from template?
I would not replace the current option New / Script but add additional selection with possible shortcut,
for example "New Script from Template". Path could be either similar to jmpStart.jsl which is saved to
specific location with specific name (jslTemplate.jsl?) and loaded from there OR you could maybe change it from Preferences if
Default is
not ok for you.
Added attachment as an example of template I would like to use. Currently I always have to copy-paste
the template (if I remember) to start new script.
Re: Automatic inclusion of Names Default to Here( 1 ) when new script window is openedHi,
Another proposal would be to use a script template that we could customize.
It would be quicker to import custom jsl framework for example (if these imports are defined in the template).