How to button press and wait until action is finishedIn one addin, I am calling an .exe to perform an operation.
How can I avoid the user to click several times in this button but not freeze the whole JMP session.
Thank you.
Re: How to button press and wait until action is finishedMaybe we also need a try catch in case there is an error?
Re: How to button press and wait until action is finishedI typically use the Enabled() message to disable the button until JMP detects the task the button has launched is completed. Below is an example that disables the button for 5 seconds and then enables the button again. Your task will be to detect when the executed task is complete.
Names Default To Here( 1 );
nw = New Window( "Example",
bb = Button Box( "Press Me",
bb << enabled( 0 );
Wait( 5 );
bb << enabled( 1 );
)
);
You can also use the Visibility() message to do the same as above. It does not gray out the button box like enabled() does, rather it makes the button box() invisible to the display until the Visibility() is reset.