K
K
Kirill Zver2019-09-12 19:00:28
Node.js
Kirill Zver, 2019-09-12 19:00:28

How to hide console when running app in pm2/forever?

Good day!
I wrote a bot, on nodejs, which performs some actions. The main one is sending a message to the chat through the game console. That is, using the clipboardy module, I copy the desired text to the clipboard, after which, thanks to kbm-robot, I simulate pasting the text (simultaneously pressing Ctrl + V) and sending (ENTER).
When you run this miracle in the usual way, through node, everything is fine. But as soon as I use forever or pm2 with the --watch option, because the kbm-robot module has a JAVA dependency, the java console starts up. Each time a message is sent to the chat, namely at the moment of simulating a keystroke, this console appears on top of the game and the text is inserted into the console. But since this happens for a moment (the console over the game), sometimes the message is still sent.
It is worth noting that everything runs on Windows Server 2016.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question