Others will certainly chime in here...I've got little experience with command-line options and/or the SDK.
However, I believe, if you send a PLC outbound, say to a non-existent module, you can create a macro that
will trigger on that and set your flag. Or, perhaps if you've got a two-way module, you could send it a PLC and when
the controller 'hears' the response, you could trigger on that and set the flag.