cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
N1ck
Level II

[Urgent] How to replace Hotkeys in JMP

Hello friend:

 

Recently I came across a tough issue with regard to the Hotkeys in JMP. And I originally intended to briefly introduce it, but it is too important for me. I have the right to let you know the entire matter, not the fragments.

 

Background:

Currently I am taking responsible for the JMP (JMP16) & Python report automation of whole department, so I established a report automation system (this system is on my PC, I am not a IT personnel in the company, so I don't have server to interact with users, just developed this system based on my interest, and I learned a lot for it) based on e-mail,  it can automatically recieving the email with specific mail subject, and then will trigger the mail rule to pass a mail item object to python via VBA, then Python script will automatically generating the JMP report based on the attachment from mail item object and automatically replying previous mail with a report as attachment.

 

Issue:

As all we know, if we add "//!" into the first row in JSL, then we only double-click the JSL file, JSL will automatically running, but we can press CTRL to interrupt it and then the JSL pops out. As mentioned before, this system is running on my PC, so there will be two circumstances when users send the mail with specific subject to me:

  • -circumstance 1 (GOOD):  if I do not press CTRL in the whole process of  JMP JSL running, everything will be fine.   
  • -circumstance 2 (NG): if I press CTRL in the whole process of  JMP JSL running,  JSL will be pop out, many plots will not be generated, also it means FAIL.

 

Troubl Shooting:

  1. I Checked the Hotkeys in JMP Preferences, I don't know if I am missing it or it actually not exist in Preference
  2. Asked JMP staff for help on it, but found no way to replace this Hotkeys
  3. I suspect that JMP developers did not open the interface for this modification.

 

Help Needed:

Need to replace CTRL to other buttons that are not commonly used to interrupt JSL. 

 

I am looking forward to your reply, thanks a ton in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
N1ck
Level II

Re: [Urgent] How to replace Hotkeys in JMP

Good Morning! Craige, thanks for your help. For this question, this morning I have got an idea for it, and it should be Ok to solve it.
Write some codes with Python to make CTRL be disable to use during Python calls JSL and JSL running, after the part of JMP-related finished, then make CTRL be able to use. Usually, generates a JMP report (10000 rows data, 100x JMP plots) only take 20 seconds, that means CTRL not able to use will last 20s, it is not a problem.

View solution in original post

9 REPLIES 9
Craige_Hales
Super User

Re: [Urgent] How to replace Hotkeys in JMP

I think you are asking about the escape key to interrupt JMP. Have you tried minimizing all the JMP windows? I think that might leave the keyboard focus somewhere else so JMP won't get the keystroke (maybe the desktop will receive it.) I think JMP has a minimize window function.

Craige
Craige_Hales
Super User

Re: [Urgent] How to replace Hotkeys in JMP

// the home window must not be open; I don't know how to access it,
// choose the pref for the jmp starter instead. You could manually 
// minimize the home window instead. this only sets the pref, does
// not close the home window
// set preference(Initial JMP Window( "JMP Starter" ));

wait(1); // make sure windows open before minimizing them
windows = getwindowlist(); // does not get the home window
foreach({w},windows,show(w<<getwindowtitle);w<<Minimize Window( 1 ););

// with no window visible, escape does not stop this loop
for(i=1,i<20,i+=1,wait(1);print(i);beep());

 You might need to make a user function out of that and call it each time you open a new analysis window. Or you could run the analysis without opening a window.

Craige
N1ck
Level II

Re: [Urgent] How to replace Hotkeys in JMP

Craige, thanks for your reply and kindness!

At first, I want to show you two simple JSL examples:

without //!

 

 //Save this JSL to desktop, and double click the JSL, you will find it will pop out, //but directly generate a new datatable, unless you manually click run button
newtable();

with //!

 

 

//!
newtable();
//Save this JSL to desktop, and double click the JSL, you will find it will directly //generate a new data table.

 

The advantage of with //! is no need to click run button to run the JSL, so I take this way as a part of report automation system.

Secondly, I want to briefly clarify the process of this system again.

  1. Send mail with specific subject to me from users
  2. Mail will pass a mail item object to Python via VBA
  3. Python will be run and call JSL with //! to generate JMP plots and do other stuffs
  4. Python generated report and reply the mail with the report as attachment.

Ideally, this system should be perfect because the whole process is completely automation, but the point is this system runs on my PC, if someone send the mail with specific subject to me, the system will be activated and perform the above process, and if  I am working at the same time and press CTRL+C/V to do some works, it will directly interrupt the JSL running, so it really has a huge risk when I am working and someone send the mail to me at the same time, thus I want to know how I can replace CTRL with other buttons to interrupt JSL. At least so far I think the only way to solve this issue is replace it after evaluated the whole process

Craige_Hales
Super User

Re: [Urgent] How to replace Hotkeys in JMP

Change the python code to launch JMP with a command line argument that specifies the .jsl file, rather than launching the .jsl file with the //! at the start.

capture.png

JMP seems not to be in the path, so I grabbed the executable+path from the icon.

Craige
Craige_Hales
Super User

Re: [Urgent] How to replace Hotkeys in JMP

Sorry, that seems to also use the control key to suppress the script from running.

Thinking about it...

 

Craige
N1ck
Level II

Re: [Urgent] How to replace Hotkeys in JMP

Thanks for the quick reply, you are a really amazing man, thank you. Actually a JMP staff who talked with me a few days ago also provide this method to solve this issue, and I tried this method and found that it will launch a new JMP process when call JSL in this way for every call, it is unacceptable that takes up a lot of memory and not works as my expectation, so I gave up this way. Back to the original question, is it possible that replace CTRL with other buttons?
Craige_Hales
Super User

Re: [Urgent] How to replace Hotkeys in JMP

Probably not. The control key is not handled like the hot keys; it does not go through any of the menu interface.

 

What you might be able to do is use the automation interface (pdf) to control JMP from VB. I'm not sure if anyone has ever used automation from Python; it might be possible with pywin32 but a 10 minute effort won't be enough...

 

 

Craige
N1ck
Level II

Re: [Urgent] How to replace Hotkeys in JMP

Good Morning! Craige, thanks for your help. For this question, this morning I have got an idea for it, and it should be Ok to solve it.
Write some codes with Python to make CTRL be disable to use during Python calls JSL and JSL running, after the part of JMP-related finished, then make CTRL be able to use. Usually, generates a JMP report (10000 rows data, 100x JMP plots) only take 20 seconds, that means CTRL not able to use will last 20s, it is not a problem.
N1ck
Level II

Re: [Urgent] How to replace Hotkeys in JMP

Craige, thank you again for the help and reply