Idea is to start apps not natively supported in SC (eg Metaguide, MGDither, CdC etc) as part of a sequence.
I am currently doing this through a python script. i.e., use sequencer step "Run the python script in <script>" where the <script> has code to start an exe file.
Can it be done directly, that is, a sequencer step like "Run executable <filepathname>" ?
If not, any possibility of incorporating as a new sequencer step?
Thanks
Running an exe directly from sequencer
- admin
- Site Admin
- Posts: 13344
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Running an exe directly from sequencer
Hi,
yes, this is in the 'Misc' section - 'Run <program to run> with arguments ...' - you can also specify whether the sequencer should wait for the program to exit or leave it running and carry on with other steps.
cheers,
Robin
yes, this is in the 'Misc' section - 'Run <program to run> with arguments ...' - you can also specify whether the sequencer should wait for the program to exit or leave it running and carry on with other steps.
cheers,
Robin
-
- Posts: 156
- Joined: Mon Mar 01, 2021 5:24 am
Re: Running an exe directly from sequencer
So it is. Now how did I miss that?
Thanks.
Thanks.
Re: Running an exe directly from sequencer
I am trying to use this "Run" command from the sequencer, but I am clearly missing something, as it does not work the way I thought it would be working...
I want to launch a script processing the data from a rapid burst of very short images once the sequence is done (a lot of data processing done mostly in python). For now, I am launching just a basic script to test if it works... Data processing has been already tested in stand alone mode.
I assume for now that the script will be launched from the PowerShell (though I have also a version using a PowerShell bash command to launch a Linux version, the latter working also directly from an Ubuntu window).
Options of the Run "Select Step Properties"
Program to run: C:\Data\RINGSS\python_code\test.ps1
Arguments: 2023-10-17 Vega
Feedback:
An error occurred trying to start process 'C:\Data\RINGSS\python_code\test.ps1' with working directory 'C:\Users\cveil\Downloads'. The specified executable is not a valid application for this OS platform.' while running step Run 'C:\Data\RINGSS\python_code\test.ps1' with parameters '2023-10-17 Vega' and wait for it to exit
12:41:25 PM End : Sequence halted due to error.
Thanks for any advice! SharpCap is great, especially the sequencer! I am for now stuck with not knowing how to make this "Run" step work...
Cheers from AZ,
Christian
I want to launch a script processing the data from a rapid burst of very short images once the sequence is done (a lot of data processing done mostly in python). For now, I am launching just a basic script to test if it works... Data processing has been already tested in stand alone mode.
I assume for now that the script will be launched from the PowerShell (though I have also a version using a PowerShell bash command to launch a Linux version, the latter working also directly from an Ubuntu window).
Options of the Run "Select Step Properties"
Program to run: C:\Data\RINGSS\python_code\test.ps1
Arguments: 2023-10-17 Vega
Feedback:
An error occurred trying to start process 'C:\Data\RINGSS\python_code\test.ps1' with working directory 'C:\Users\cveil\Downloads'. The specified executable is not a valid application for this OS platform.' while running step Run 'C:\Data\RINGSS\python_code\test.ps1' with parameters '2023-10-17 Vega' and wait for it to exit
12:41:25 PM End : Sequence halted due to error.
Thanks for any advice! SharpCap is great, especially the sequencer! I am for now stuck with not knowing how to make this "Run" step work...
Cheers from AZ,
Christian
- admin
- Site Admin
- Posts: 13344
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Running an exe directly from sequencer
Hi Christian,
from the text of the error message, I suspect that Windows is being reluctant to run the .ps1 file as a script. Probably the trick to fix this will be to actually change the step to run Powershell.exe directly - something like
The -ep bypass option stops Powershell from getting upset about being asked to run a script from file - may or may not be necessary.
cheers,
Robin
from the text of the error message, I suspect that Windows is being reluctant to run the .ps1 file as a script. Probably the trick to fix this will be to actually change the step to run Powershell.exe directly - something like
Code: Select all
powershell -ep bypass C:\Data\RINGSS\python_code\test.ps1
cheers,
Robin
Re: Running an exe directly from sequencer
Thanks, Robin. It works!
It actually works with and without the -ep bypass option, so I'll just go without it.
Cheers!
Code: Select all
RUN powershell WITH PARAMS "-ep bypass C:\Data\RINGSS\python_code\test.ps1 2023-10-17 Vega" WAIT True
Cheers!