DWC spinning wheen not stopping when macro completes.
-
I often want to get user input in a macro. Currently, the only way I know how is to use an M291 command with a message like " select OK for 1 and Cancel for 2. I'm setting this up in the generic callable macro below.
; Macro to be called from other macros to let user select one of two options (OK and Cancel) ; Parameters ; S = Message to be displayed ; Return ; Global.OK_CANCEL is set to "OK" or "CANCEL" ; Usage M98 P"<dir>/OK_Cancel_checker.g" S"Select OK for <option 1> and Cancel for <option 2>" if !exists(global.OK_CANCEL) global OK_CANCEL = "NO MESSAGE" else set global.OK_CANCEL = "NO MESSAGE" ;Check for parameters if !exists(param.S) ; see if a parameter was provided M291 P"Message parameter not provided. " S0 T5 M99 set global.OK_CANCEL = "CANCEL" M291 P{param.S} S3 T-1 set global.OK_CANCEL = "OK" M99
When I call this with the following command in the command page in DWC, then select OK, the global variable is set and the macro exits as expected. However, if I select Cancel, the global variable is set, but the little spinning "busy" wheel over the send button in DWC keeps spinning. I can send a command from the Send box at the top of DWC and it executes and stops the "busy" wheel.
M98 P"0:/macros/3. debug_stuff/OK_Cancel_checker.g" S"select OK for OK and Cancel for cancel"
If I embed this command in another macro and run that (which is normal usage, then select Cancel, the "busy" wheel does not keep spinning.
I'm running RRF 3.4.0 and DWC 3.4.0