Krombik / keysender

Node.js Desktop Automation for Windows.
MIT License
75 stars 6 forks source link

Cancel/Interrupt an action #8

Closed ch3rn1k closed 1 year ago

ch3rn1k commented 1 year ago

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

Krombik commented 1 year 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 1 year ago

Yeah, that would be great

Krombik commented 1 year ago

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

ch3rn1k commented 1 year ago

Works great! Thanks! :)