I 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.
Jim