cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
hogi
Level XII

Keyboard shortcut for "Help Scripting Index"?

In a script window, the user can right click on a function and click on "Help Scripting Index".

This opens the Scripting Index with the function selected

 

Can this action also be triggered by a Keyboard Shortcut?

 

If not, can an add-in do the same:
- check where the cursor is in the code

- check for the surrounding function (with spaces etc.)

- open the scripting index on th e right page

Then I could assign a keyboard shortcut ..

hogi_0-1666356475441.png

9 REPLIES 9
txnelson
Super User

Re: Keyboard shortcut for "Help Scripting Index"?

main menu("scripting index")

is the JSL that will open the Scripting Index

You should be able to add this to 

     View=>Customize=>Menus and Toolbars

as a keyboard shortcut

Jim
jthi
Super User

Re: Keyboard shortcut for "Help Scripting Index"?

I think to check cursor location you would need to use Windows API or something similar. If you can figure out where the cursor is you could most likely use something like:

 

Get Line Text (and other Script Box methods. Also see Scripting the Script Editor 

Names Default To Here(1);
New Window("Example", sb = Script Box("print(\!"Hello\!");"));
Print(sb << Get Line Text(1));

 

Open Help

Names Default To Here(1);
Open Help(
	"Scripting Index",
	Search(Term("Open"), Match({"Contains Terms", "Match All Terms", "Ignore Case"})),
	IndexContext(Category("Functions"))
);
-Jarmo
hogi
Level XII

Re: Keyboard shortcut for "Help Scripting Index"?

Thanks for the modules. Hm, unfortunately, more complicated than I hoped.

altenantive: wish to add a keyboard shortcut directly to jmp
https://community.jmp.com/t5/JMP-Wish-List/Keyboard-shortcut-to-open-Scripting-Index-on-the-correct-... 

Re: Keyboard shortcut for "Help Scripting Index"?

It is pretty simple. Select View > Customize > Menus and Toolbars. Find the Help > Scripting Index command in the list on the left side and select it. Assign the new keyboard equivalent you want near the bottom. I illustrate with Shift-Control-I (Windows example).

 

custom.PNG

hogi
Level XII

Re: Keyboard shortcut for "Help Scripting Index"?

Hi @Mark_Bailey.

On my system, the command "Scripting Index" from "Help" just opens the Scripting Index.

Actually, exactly what it says ...
- but quite different from what The "Scripting Index" in the right context menu can do.

 

Re: Keyboard shortcut for "Help Scripting Index"?

I apologize. I reread your original post and realized you were asking for something else. I was responding to some of the early replies instead of your request.

jthi
Super User

Re: Keyboard shortcut for "Help Scripting Index"?

There are quite a few shortcuts JMP's script editor is missing. Such as move line up/down, copy line up/down, run line, run until cursor and so on (some of the useful can be found for example from Key Bindings for Visual Studio Code). Shortcuts should also be very easy to rebind.

 

I also have a long list of features/shortcuts I would like to have added, but haven't made wish list item for them (so I'll have to manage without for now).

-Jarmo
hogi
Level XII

Re: Keyboard shortcut for "Help Scripting Index"?

run line:
enter on numerical keyboard

 

(if some text is selected, JMP just runs the selected text)

hogi
Level XII

Re: Keyboard shortcut for "Help Scripting Index"?

in JMP 17: Alt + double click

hogi_0-1666807790157.png