E1M1 Posted December 16, 2009 Posted December 16, 2009 (edited) Hi I am getting error if I use /AutoIt3ExecuteScript to run my script ConsoleWriteLine("Hello World") In my au3 script I have line ConsoleWriteLine("Hello World") and in my compiled exe file I have: Func ConsoleWriteLine($sData) ;~ ConsoleWrite($sData & @CRLF) If $output = "window" Then _GUICtrlEdit_AppendText($edit, $sData & @CRLF) Return ElseIf $output = "-1" Then Return Else FileWrite($output, $sData & @CRLF) EndIf EndFunc ;==>ConsoleWriteLine And If I try run It I see msgbox says. Line 5 (File "C:\Documents and Settings\rain\Local Settings\Temp\plugins.au3"): ConsoleWriteLine("Hello World") ^ ERROR Error: Unknown function name. How to fix this function? if I have Func ConsoleWriteLine($sData) in my *.exe script then how to use ConsoleWriteLine("Hello World") in script I want to use with /AutoIt3ExecuteScript? Edited December 16, 2009 by E1M1 edited
Developers Jos Posted December 16, 2009 Developers Posted December 16, 2009 You can't as you start a total new instance of AutoIt3. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
E1M1 Posted December 16, 2009 Author Posted December 16, 2009 Is there any other way to use in au3 ConsoleWriteLine("Hello World") than coding it in new au3? Just asking it cuz I want to keep that au3 I use with /AutoIt3ExecuteScript clean and short as possible. edited
Mobius Posted December 16, 2009 Posted December 16, 2009 (edited) The function plus the additional udf code must reside within the script you are attempting to call with /AutoExecutScript for the reasons already dictated. Ed: What you are suggesting would be a very nice idea (in any implementable form), perhaps it will be at the ass end of someones todolist one day (given what has already been achieved with the format) who knows. Edited December 16, 2009 by Mobius
Skruge Posted December 16, 2009 Posted December 16, 2009 Is there any other way to use in au3 ConsoleWriteLine("Hello World") than coding it in new au3? Just asking it cuz I want to keep that au3 I use with /AutoIt3ExecuteScript clean and short as possible. One way to accomplish this would be to put the functions in another file and #include it in each script. #include "path\to\your_library.au3" ConsoleWriteLine("Hello World") [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]
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