Advertisement
Guest User

Untitled

a guest
Nov 16th, 2012
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. h.
  2.  
  3. while true
  4. do
  5. if [ "$(ps -W | grep -w CamTran2 | gawk '{print $8,$9}' | gawk -F \\ '{print $4}')" != 'SRPro.exe' ];then
  6. /cygdrive/c/Scanner\ Stuff/SRPro/CamTran2/Record\ CamTran2.bat
  7. sleep 15s
  8.  
  9. elif [ "$(ps -W | grep -w CamTran3 | gawk '{print $8,$9}' | gawk -F \\ '{print $4}')" != 'SRPro.exe' ];then
  10. /cygdrive/c/Scanner\ Stuff/SRPro/CamTran3/Record\ CamTran3.bat
  11. sleep 15s
  12.  
  13. elif [ "$(ps -W | grep -w CamTest | gawk '{print $8,$9}' | gawk -F \\ '{print $4}')" != 'SRPro.exe' ];then
  14. /cygdrive/c/Scanner\ Stuff/SRPro/CamTest/Record\ CamTest.bat
  15.  
  16.  
  17. elif [ "$(ps -W | grep -w CamTest2 | gawk '{print $8,$9}' | gawk -F \\ '{print $4}')" != 'SRPro.exe' ];then
  18. /cygdrive/c/Scanner\ Stuff/SRPro/CamTest2/Record\ CamTest2.bat
  19.  
  20.  
  21. elif [ "$(ps -W | grep -w Ops | gawk '{print $8,$9}' | gawk -F \\ '{print $4}')" != 'SRPro.exe' ];then
  22. /cygdrive/c/Scanner\ Stuff/SRPro/Ops/Record\ Ops.bat
  23.  
  24.  
  25. elif [ "$(ps -W | grep -w Ops2 | gawk '{print $8,$9}' | gawk -F \\ '{print $4}')" != 'SRPro.exe' ];then
  26. /cygdrive/c/Scanner\ Stuff/SRPro/Ops2/Record\ Ops2.bat
  27.  
  28. elif [ "$(tasklist /FI "windowtitle eq Microsoft Visual C++ Debug Library" | grep SRPro.exe | gawk '{print $1}')" == 'SRPro.exe' ];then
  29. taskkill /f /FI "windowtitle eq Microsoft Visual C++ Debug Library"
  30. sleep 15s
  31.  
  32. else
  33. sleep 1
  34. fi
  35. done
  36.  
  37. HERE IS an example bat file:
  38.  
  39. "c:\Scanner Stuff\SRPro\CamTran3\SRPro.exe" "c:\Scanner Stuff\SRPro\CamTran3\camtran3.srp"
  40.  
  41. Basically the second paramter just tells the original program what "profile" file to know what settings to run with and it it will leave a batch file open in background for each program.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement