Hi,
Is it possible to run a script located in script folder of WinCC OA project from an event of a graphical object, like "clicked" for a push button?
How?
Thank you.
Run script .ctl from an graphical object event
- ange.ogawin
- Posts:18
- Joined: Thu Mar 14, 2019 10:51 am
Run script .ctl from an graphical object event
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Run script .ctl from an graphical object event
Yes it is possible to start a script which is located in the scripts folder with a system() command starting a WinCC OA CTRL Manager.
Another solution is to load the script into a string variable and call the function execScript() with the string variable as parameter.
For details please have a look at the WinCC OA Documentation.
Why do you want to start a script instead of defining the same code as function in a library and call the function?
Should the script run all the time or is it a script which runs and then stops when the execution is finished?
Best Regards
Leopold Knipp
Senior Support Specialist
Another solution is to load the script into a string variable and call the function execScript() with the string variable as parameter.
For details please have a look at the WinCC OA Documentation.
Why do you want to start a script instead of defining the same code as function in a library and call the function?
Should the script run all the time or is it a script which runs and then stops when the execution is finished?
Best Regards
Leopold Knipp
Senior Support Specialist