Jump to content

Change lots of Programs in a batch possible?


---
 Share

Recommended Posts

Hello experts,

We have around 1,500 programmes, the majority of which run via Autorun. To display the workpiece positioning status, we use ‘CNC → Measurement Sequence Information for CNC start-up'. This does not link directly to an image, but rather to a small script that launches a simple and secure image viewer.

For historical reasons, this is a *.bat command script that has many drawbacks. We would like to replace it with VB/Perl/Python...
However, to do this, we would have to open more than 600 programes manually to change the link from XXX.bat to, for example, XXX.vb. This is not an option.
Simply call from this *.bat script a VB script lead to open an terminal window ( one of the big drawbacks..) for up to seconds. This should be mainly suppressed.

Is there a way to run this change as a batch job? The entries are contained in the inspection/inspset files..

Best Regards
Karsten

Link to comment
Share on other sites

Please sign in to view this quote.

you can make the VBS script run in a hidden window by using the "0" parameter.  For example, I run a lot of .bat files but I want the terminal window hidden from operators, so I use something like this.  

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "cmd.exe /c C:\Path\To\your_file.bat", 0, False

 

Link to comment
Share on other sites

Chad,
Thanks for the tipp.
I already use this but unfortunately the terminal window from calling Process ist still open because I have to wait until the image viewer is started to send via IPC a signal. Otherwise the window is not in focus. This take around 1-2 second´s and the terminal is still open this time.

David,
Thanks but I prefer to use vi 🙂 or in this face find, grep,awk ...
The big question is:
If I change the inspection/inspset files, will CALYPSO take account of it or is it ignored or more worse: Is running but use save program will overwrite the changed files with old values.

Martin,
Fine, but what do you use to do this?

Link to comment
Share on other sites

I would need what approach you want to go.

Mass edit of inspection file changing ".bat" to another executable or another approach?

I am using vbs script which hides batch window while having scheduled task.

CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False

Using it like

hidden.vbs do_work.bat
Link to comment
Share on other sites

 Share

×
×
  • Create New...