jvetter713 Posted July 30, 2006 Posted July 30, 2006 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?
jvetter713 Posted July 31, 2006 Author Posted July 31, 2006 I figured it out and will share what I did if anyone is interested.
Smorg Posted July 31, 2006 Posted July 31, 2006 I'd go with enviornment variables or regestry. Not a ton of ways to communicate unless you write a custom dll.
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