using SendInput in Node-FFI

后端 未结 3 1431
-上瘾入骨i
-上瘾入骨i 2021-01-17 01:22

I wanted to use the SendInput function from the windows Api in nodejs, using the FFI package.

My knowledge of C is limited so I can\'t really figure out what problem

3条回答
  •  不思量自难忘°
    2021-01-17 01:46

    The "1" tells you that 1 event was inserted, not what the event actually is. I don't know about FFI but it seems to me that keyboardInput has some invalid type definitions. wVK and wScan must be 16-bit integers (hence the 'w' for WORD). Since they are typed the same as dwFlags (an 'int') that's cause invalid input values.

提交回复
热议问题