Send a message into the currently open Viber chat on Windows, driving the official Viber Desktop client through Microsoft UI Automation.
viber_send.py attaches to the running Viber Desktop window via UI Automation,
finds the compose box in the open chat, types your text, and sends it. Whatever
conversation is currently open in Viber receives the message. It only sends —
no reading, chat switching, notifications, or logging.
-
OS: Windows 10 or 11
-
Python: 3.10+ (run with
pyorpython) -
Packages:
pywinautoandcomtypespip install pywinauto comtypes
-
Viber: Viber Desktop installed, logged in, and running, with the target chat already open on screen.
-
Session: A real, unlocked, interactive desktop. UI Automation and keyboard input fail on a locked workstation or a headless/disconnected session.
py viber_send.py "Your message here"Wrap the message in double quotes so the shell passes it as one argument. The message goes to whichever chat is currently open in Viber.