Zohar Posted January 5, 2010 Posted January 5, 2010 (edited) Hello I need to call a small .NET program via an AutoIt program, and I need to send the .NET Program several strings, and get 1 string back from it. What are my recommended options for this? the return value is a string, and I need to return it when the .NET program ends. If it was an int, I could use the program's ReturnValue(ExitCode, or ERROR code as it is called in Batch files), but since I need to return a String here, then the ExitCode will not be good here, so I need another simple and clean idea. Thank you Edited January 9, 2010 by Zohar
Juvigy Posted January 5, 2010 Posted January 5, 2010 You can use local file to store and read the data you need. For example an INI file.
Zohar Posted January 5, 2010 Author Posted January 5, 2010 You can use local file to store and read the data you need.For example an INI file.HiThank youI thought about it, but I would like something that is more memory based..and hopefully not via using the clipboard..If someone has an idea..
jvanegmond Posted January 5, 2010 Posted January 5, 2010 You can start the .NET program with command line arguments, then capture the console output of the .NET program in AutoIt. github.com/jvanegmond
jrumbaug Posted January 7, 2010 Posted January 7, 2010 I have not tried this but...... run a SET DOS comand and make an invironment variable with the string's value. Then have Autoit read the variable. I've been thinking out of the box
Richard Robertson Posted January 7, 2010 Posted January 7, 2010 Manadar's suggestion is better. The console is super easy to use in .Net. System.Console.Write("Hello AutoIt");
Zohar Posted January 7, 2010 Author Posted January 7, 2010 (edited) Manadar and Richard: Works great. Thank you. Here's what I used: Local $StdOut Do Sleep(100) $StdOut =StdoutRead($PID) Until $StdOut<>"" Msg($StdOut) jrumbaug: I have not tried this but...... run a SET DOS comand and make an invironment variable with the string's value. Then have Autoit read the variable.definately creative.. Edited January 7, 2010 by Zohar
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now