OS: Linux Mint 21.3
Python version: 3
I’m transcribing .mp3 audio files. To make the job easier, I’ve bound the following script in AutoKey to a hotkey.
It allows for opening whatever text is highlighted as a file in the VLC media player:
How can I open a file in an existing VLC instance whenever the script runs?
Python version: 3
I’m transcribing .mp3 audio files. To make the job easier, I’ve bound the following script in AutoKey to a hotkey.
It allows for opening whatever text is highlighted as a file in the VLC media player:
import subprocess audiofile = clipboard.get_selection() subprocess.run( [ "vlc", "/mnt/SSD/Audio/{}.mp3".format(audiofile), ], )The script runs fine. However, every command to run VLC opens a new window, cluttering the system.
How can I open a file in an existing VLC instance whenever the script runs?
subprocess.run
doesn’t seem to be right for this.