Jump to content

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


Zohar
 Share

Recommended Posts

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
Link to comment
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..

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...