annuler
Affichage des résultats de 
Rechercher plutôt 
Vouliez-vous dire : 

call and make changes to script

Hello,

 

I want to call a script and make changes to some of the numbers in that script and run it.

Can I just call the script without running it using System Exec vi?? I can separate the numbers from the script output after running it with system exec. But I want to get the default numbers in the script without running it. 

And after I get the numbers, how can I replace the numbers with whatever the numeric control input? 

 

Thanks a lot

0 Compliments
Message 1 sur 7
3 276 Visites

What kind of script are you talking about?

 

Matlab script?

Java script?

a batch file?

0 Compliments
Message 2 sur 7
3 273 Visites

It is a batch file. The vi calls another software and execute the script.

 

Thanks

0 Compliments
Message 3 sur 7
3 243 Visites

If it is a batch file, then you must use system Exec to run it.  Unless there is some other method I have never heard of.

0 Compliments
Message 4 sur 7
3 230 Visites

Hello ZCY 4444,

 

It seems like what you're looking for is a way to edit the script, not "call" it.  Batch files are just text files, so you should be able to read it as such, modify the strings, and resave as needed.

 

I'd recommend adding one or more arguments to the script that override these "numbers" though, rather than reading and replacing the file.

 

Regards,

Tom L.
0 Compliments
Message 5 sur 7
3 223 Visites

Hi Tom,

 

Thanks for the suggestion. I will work on that.

 

Regards,

zcy

0 Compliments
Message 6 sur 7
3 221 Visites

Thank you. I will keep working on it,

0 Compliments
Message 7 sur 7
3 220 Visites