Jump to content

Retrieve output?


Recommended Posts

Is there anyway I can retrieve the ouput of a function from a compiled script?

For example, if I have the following script that I compile:

func Test()

Return "Hello"

EndFunc

Is there anyway I can run this (Like from the Command Prompt) and have it return to me the text?

The reason I want this ability is because I use the ActiveX version and there are many functions that just arent in there....GUICreate being one of them.

I thought I might be able to compile something like:

Func CreateAutoItxGui($WindowTitle, $parent = "", $width = 0, $height = 0, $left = -1, $top = -1, $style = -1, $exStyle = -1)

Return GUICreate($WindowTitle, $width, $height, $left, $top, $style, $exStyle, $parent)

EndFunc

And then be able to execute that from a .NET program....something like:

Dim objProcess As New Process

objProcess.StartInfo.UseShellExecute = False

objProcess.StartInfo.RedirectStandardOutput = True

objProcess.StartInfo.RedirectStandardInput = True

objProcess.StartInfo.FileName = "C:\CommandLineTest.exe"

objProcess.Start()

Dim strOutPut As String = objProcess.StandardOutput.ReadToEnd

MsgBox(strOutPut)

Any ideas?

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