Run Resolver One Spreadsheet Py File with same name as bat file


/ Published in: DOS Batch
Save to your folder(s)



Copy this code and paste it in your HTML
  1. @rem Run Resolver One Spreadsheet Py File with same name as bat file
  2. @rem Laurence Toenjes Monday, January 04, 2010
  3.  
  4. @rem # RunAddNums.py for standalone mode
  5. @rem from resolverlib import RunWorkbook
  6. @rem import sys
  7. @rem wb = RunWorkbook( 'AddNums.rsl', {'param1': eval(sys.argv[1]), 'param2': eval(sys.argv[2]) } )
  8. @rem print wb['Sheet1'].A3
  9.  
  10.  
  11. @IF EXIST "%~dp0resolverlib" (
  12. GOTO :StandAloneMode
  13. )
  14.  
  15. @IF EXIST "%ProgramFiles(x86)%" (
  16. GOTO :ProgFileX86
  17. ) ELSE (
  18. GOTO :ProgFile
  19. )
  20.  
  21. :StandAloneMode
  22. @PUSHD "%~dp0"
  23. @SET r1home=%CD%
  24. @SET r1exe=%~dp0resolverlib\RSIronpython.exe
  25. @GOTO :Ready
  26.  
  27. :ProgFileX86
  28. @SET r1home=%ProgramFiles(x86)%\Resolver One
  29. @SET r1exe=%r1home%\bin\RSIronpython.exe
  30. @GOTO :Ready
  31.  
  32. :ProgFile
  33. @SET r1home=%ProgramFiles%\Resolver One
  34. @SET r1exe=%r1home%\bin\RSIronpython.exe
  35. @GOTO :Ready
  36.  
  37. :Ready
  38. "%r1exe%" "%~dpn0.py" %*

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.