Sign in to follow this  
Followers 0
Zohar

[Solved] Communicating between an AutoIt Program and a .NET (C#) Program

7 posts in this topic

#1 ·  Posted (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 by Zohar

Share this post


Link to post
Share on other sites



You can use local file to store and read the data you need.

For example an INI file.

Share this post


Link to post
Share on other sites

You can use local file to store and read the data you need.

For example an INI file.

Hi

Thank you

I 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..

Share this post


Link to post
Share on other sites

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 ;)

Share this post


Link to post
Share on other sites

Manadar's suggestion is better. The console is super easy to use in .Net.

System.Console.Write("Hello AutoIt");

Share this post


Link to post
Share on other sites

#7 ·  Posted (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 by Zohar

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0