Insert timestamp with a python script
Re: Insert timestamp with a python script
no no, NINA launch Sharpcap, with the extension /runscript to use a python script, when finished, Nina continus its work. But sure, Sharpcap is the best program for occultation with the tilmestamp inserted in the .ser video.
- admin
- Site Admin
- Posts: 13408
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Insert timestamp with a python script
Ok, in that case, change NINA to run a batch file with parameters, and then write the batch file to put some of the parameters into a text file and use the others to launch sharpcap with /runscript.
Something like...
The rather cryptic first line collects all but the first parameter to the batch file and then the second line writes all those parameters to f:\params.txt (change name of this file to suit). Finally it runs SharpCap with the script specified in the first parameter. Your script can read f:\params.txt to recover the extra parameters.
Use it like this
Which will make SharpCap load f:\testme.py and will put 'param1 param2' into f:\params.txt for the python to read
cheers,
Robin
Something like...
Code: Select all
for /f "tokens=1,* delims= " %%a in ("%*") do set ALL_BUT_FIRST=%%b
echo %ALL_BUT_FIRST% > f:\params.txt
"c:\Program Files\SharpCap 4.1 (64 bit)\SharpCap.exe" /runscript %1
Use it like this
Code: Select all
RunSharpCapWithParams.bat f:\testme.py param1 param2
cheers,
Robin
Re: Insert timestamp with a python script
Hello Robin,
Congratulations!! Everythings is ok, the .py start properly and the exit command works also in the python script.
Thanks a lot
Michel
Congratulations!! Everythings is ok, the .py start properly and the exit command works also in the python script.
Thanks a lot
Michel