Hello,
I have a main script named as main from this script I want to call another script named validateConfigs. Simply trying to isolate functionality into multiple scripts so that I can easily debug or maintain. Is it possible?
If the above requirement is do able then please also guide or share some link that how can I pass the arguments and get the values returned from the script.
Otherwise please advise what is the recommended way to isolate script code ?
Thanks
Calling other scripts
Moderators: JRL, Dorian (MJT support)
Re: Calling other scripts
I guess this is what I am looking for https://www.mjtnet.com/manuals/v15/HTML/macro.html
Re: Calling other scripts
Hi mnaeem,
As far as I've been able to figure out so far, you've got four choices:
1) Most popular choice, the link that you answered your own question with. Pepsi Hog has a nice writeup here: viewtopic.php?f=2&t=10907#p46399 and I'll just add that if your variables are REQUIRED, then you ought to use the Assigned> command at the beginning of your target script.
2) If you have a lot of data, you might want to think about putting the data in a text file, and reading it in from your downstream scripts. Either free form text, or ini files would work too. They are a little more structured.
3) A database connection is another way to go. One advantage this has over the others is you automatically keep a history of variables you pass, and your data is orderly. Can be useful for debugging. If you don't have a local database, Microsoft has an ODBC driver for text files, so you can read/write to a text file as if it were a db table.
4) A database connection via HTTP webpage. Same as #3, except your data is on the cloud, and in a real database.
Good luck!
As far as I've been able to figure out so far, you've got four choices:
1) Most popular choice, the link that you answered your own question with. Pepsi Hog has a nice writeup here: viewtopic.php?f=2&t=10907#p46399 and I'll just add that if your variables are REQUIRED, then you ought to use the Assigned> command at the beginning of your target script.
2) If you have a lot of data, you might want to think about putting the data in a text file, and reading it in from your downstream scripts. Either free form text, or ini files would work too. They are a little more structured.
3) A database connection is another way to go. One advantage this has over the others is you automatically keep a history of variables you pass, and your data is orderly. Can be useful for debugging. If you don't have a local database, Microsoft has an ODBC driver for text files, so you can read/write to a text file as if it were a db table.
4) A database connection via HTTP webpage. Same as #3, except your data is on the cloud, and in a real database.
Good luck!
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey
Re: Calling other scripts
Hello mightycpa,
Appreciate the great ideas you have shared about how to share the data between scripts. I have looked at it and yes to me also database option seems quiet affordable as it will also help avoid file locking issues etc incase your macro is doing some heavy processing.
Thanks
Appreciate the great ideas you have shared about how to share the data between scripts. I have looked at it and yes to me also database option seems quiet affordable as it will also help avoid file locking issues etc incase your macro is doing some heavy processing.
Thanks