Florian,
You've confirmed my idea of going down the psutil route,
Many thanks,
David.
-----Original Message-----
From: program-l-bounce@xxxxxxxxxxxxx <program-l-bounce@xxxxxxxxxxxxx> On Behalf
Of Florian Beijers
Sent: 03 November 2020 17:17
To: program-l@xxxxxxxxxxxxx
Subject: [program-l] Re: Program to switch between screen readers
You'd have to find a way to check the currently running processes for a given
process and it's a simple if statement from there.
nvda = "Nvda.exe" in (p.name() for p in psutil.process_iter()) if nvda:
kill nvda
run jaws
else
kill JAWS
run NVDA
To kill either application you can run the shell command:
taskkill /f //im nvda.exe
I'm sure Python has some way of initiating what would essentially be a command
from the windows+r run dialog.
FLorian
2020-11-03 17:50 GMT+01:00, reynoldsdavid46@xxxxxxxxx
<reynoldsdavid46@xxxxxxxxx>:
Hi,** To leave the list, click on the immediately-following link:-
The subject says it all, and I thought rather than re-invent the
wheel, I'd put it out there.
In short, if jfw is running, I want to close it down, and start nvda,
and vice versa.
I reckon it should be possible in Python, but if there's a better way,
I'd be glad toknow,
Many thanks for any thoughts,
David.