octalmage / active-window

Get active window title in Node.js.
160 stars 51 forks source link

Can't run code more than once. #31

Closed masudhossain closed 5 years ago

masudhossain commented 5 years ago

screenshot of console error: http://prntscr.com/odx8e1

When i try to run the example code multiple times, i get the above error on console. #

masudhossain commented 5 years ago

This is NOT the fix to the problem, but doing monitor.getActiveWindow(callback,-1,1); will execute the code every 1 second forever. This is a minor solution to my problem, but it's doable, afaik.