[bug] Status Not Updated In Log File

Below is the log file from an marco where I set the status statusOK to false, but the top line of the log file still states Status=OK. I thought these would be linked like as when there is an error.

I was planning to use this method in a different macro to indicate when the server rejects an invalid command and displays a rejection message.


[status] Playing macro /macros/MWSClipboardPaste_Windows_Visual_SingleMonitor_CMDCheck.json
[info] Executing: | store | false | !statusOK |
[info] Macro completed (Runtime 0.05s)

Use ThrowError command if you want to fail the macro with a message instead of setting Status to false.

The solution from @harshavardan_akella is correct. Use the ThrowError command.

Some background info: The !statusOk variable is internally only used to communicate internal status changes to the user. This means that the system sets it to false if an error happens, but otherwise the variable is not watched internally.