[nvda] Badly written helpful batch files

Note this is crossposted to 2 groups, if you reply to this thread, I have no idea what will happen if you are not on one of the groups.

Now here is a little present from me. I'm no programmer, but I recognise a useful routine when I see it, so with apologies to whoever I ripped the main routine from, and the following provisos, here are some quick and dirty screenreader switching batch files you can use.

Warning, none of these allow the screenreader being left to save anything, so be sure to force this before you switch. In the case of the Dolphin products. Ie, Start the product as normal then restart to do this save for sure. Don't blame me if carol comes back, or you lose that vital situation setting you made ten mins ago, OK

?



Also, do not set the screenreaders to exit samwhen they exit, or it will fall over when switching between Dolphin products. Once again, this is due to the uncaring way the processes are shut down!

nvda does not have time to save either, just in case you are wondering.

This first batch file switches from a dolphin product to nvda.

@echo off



set _list=tasklist /fo csv /nh

set _kill=taskkill /f /t /pid

set _forparm=/f "usebackq tokens=2 delims=," %%a

for %_forparm% in (`%_list% /m dol_osm.dll`) do %_kill% %%a

set _list=

set _kill=

set _forparm=

start c:\progra~1\nvda\nvda.exe

exit

=======

These next two switch fromDolphin or nvda to either Hal or Supernova respectively.





@echo off

set _list=tasklist /fo csv /nh

set _kill=taskkill /f /t /pid

set _forparm=/f "usebackq tokens=2 delims=," %%a

for %_forparm% in (`%_list% /m dol_osm.dll`) do %_kill% %%a

set _list=

set _kill=

set _forparm=



set _list=tasklist /fo csv /nh

set _kill=taskkill /f /t /pid

set _forparm=/f "usebackq tokens=2 delims=," %%a

for %_forparm% in (`%_list% /fi "imagename eq nvda.exe"`) do %_kill% %%a

set _list=

set _kill=

set _forparm=

start c:\progra~1\dolphin\hal1001\hal.exe

exit

======

@echo off

set _list=tasklist /fo csv /nh

set _kill=taskkill /f /t /pid

set _forparm=/f "usebackq tokens=2 delims=," %%a

for %_forparm% in (`%_list% /m dol_osm.dll`) do %_kill% %%a

set _list=

set _kill=

set _forparm=

set _list=tasklist /fo csv /nh

set _kill=taskkill /f /t /pid

set _forparm=/f "usebackq tokens=2 delims=," %%a

for %_forparm% in (`%_list% /fi "imagename eq nvda.exe"`) do %_kill% %%a

set _list=

set _kill=

set _forparm=

start c:\progra~1\dolphin\snova\psnova.exe

exit





Note it does not trigger an error when trying to close a non running process more from luck than judgement. I could have put both in the one loop but laziness got the better of me. I look forward to the new improved versions after the festive seasons from someone on the groups so incensed by the slipshod creation of these files. *grin*

Brian








bgaff@xxxxxxxxxxx
Brian Gaff's other account.


To post messages to the list send email to
nvda@xxxxxxxxxxxxx
To modify your NVDA Email settings go to:
http://www.freelists.org/list/nvda
Thank you for your continued support of Nonvisual Desktop Access, an open 
source free screen reader for Microsoft Windows:
http://www.nvda-project.org/
To get the latest NVDA snapshot:
http://www.nvda-project.org/snapshots/
Report bugs or make feature requests at:
http://trac.nvda-project.org/
Message Archive:
http://www.freelists.org/archives/nvda

Other related posts: