I am checking possibilities of nut.js and I've encountered an issue. Program is able to copy value off website/document and I would like to keep copied value in js variable for comparison. Is that possible with nut.js or do I need some different tool to achieve that?
var paste = async() => {
let time = navigator.clipboard.writeText()
console.log(time)
}
Above code throws an error: "(node:13432) UnhandledPromiseRejectionWarning: ReferenceError: navigator is not defined"
That's probably because navigator works in browser only. I need to access current clipboard value from my PC.
Thanks
I managed to solve this using nut.js
var clipboardData = async() => {
let data = await clipboard.paste()
console.log(data)
}
Issue can be closed