Krombik / keysender

Node.js Desktop Automation for Windows.
MIT License
82 stars 9 forks source link

Cancel/Interrupt an action #8

Closed ch3rn1k closed 2 years ago

ch3rn1k commented 2 years ago

Hello! Any way to interrupt an action? Like printText or humanMoveTo? Thanks

Krombik commented 2 years ago

not currently, but I can add an extra parameter, a validation function that will be called before every mouse move or print, or I can try to add ref parameter to which the cancel method will be written

ch3rn1k commented 2 years ago

Yeah, that would be great

Krombik commented 2 years ago

I add cancelCurrent method to sendKeys, printText and humanMoveTo methods, call it to interrupt the execution

ch3rn1k commented 2 years ago

Works great! Thanks! :)