Open kvnxiao opened 6 years ago
Only StopEvent(), no other.
Then is it possible to implement an interrupt to fully pause automation process?
The easiest way I can think of off the top of my head is to simply store all the steps you want to run in a slice, and have a method to begin automation, checking for a pause after each step.
I don't personally want pausing to be implemented at the library level.
Rather than pausing/resuming which would require maintenance of the current state, you can probably just include golang's context
to allow people to cancel the currently running action the same way net/http works. You'd only need to check a channel, and interrupt execution if the channel is signalled.
Is there any way to interrupt an automation? For example, if I am automating mouse movement with
robotgo.MoveMouseSmooth(...)
, robotgo will obviously take over my mouse until it is done.I have a hotkey system implemented in my program where I would like to be able to "pause" or "stop" the automation if a user presses a certain key combination, so that the automation stops and the user will have full control over their mouse again.
I've looked over the docs and couldn't seem to find anything of the sorts.