Prabhu Posted October 13, 2009 Share Posted October 13, 2009 I try to invoke AutoIt from a perl script as follows: D:\>perl AutoIt.pl The perl script is as follows: `D:\\AutoIt F1.au3`; The script F1.au3 sends {F1} to a application : WinWaitActive("Control Panel") Send("{F1}") When I execute the perl script I get an error: Application failed to initialize properly (0xc0150004). However if on the command line if I do the following it is successful. D:\>AutoIt F1.au3 What could be the reason for failure. I use windows XP. Weirdly I observed that the running from perl script is successful when I try it in another machine.. Please advise. Link to comment Share on other sites More sharing options...
jvanegmond Posted October 13, 2009 Share Posted October 13, 2009 Probably because .au3 is not an executable file. When you "run" an .au3 file actually AutoIt3.exe is started. Try starting AutoIt3.exe with your au3 file as first parameter in your Perl script. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Prabhu Posted October 13, 2009 Author Share Posted October 13, 2009 Manader,I do indeed run it with AutoIt.exe. The following one line is in perl script.`D:\\AutoIt3 F1.au3`It fails. However from command line as below the same passesD:\>AutoIt3 F1.au3 Link to comment Share on other sites More sharing options...
Prabhu Posted October 13, 2009 Author Share Posted October 13, 2009 I tried AutoIt3.exe with au3 file as first parameter in Perl script. The same issue persists..perl -e "'F1.au3 AutoIt3.exe';" Link to comment Share on other sites More sharing options...
Zedna Posted October 13, 2009 Share Posted October 13, 2009 perl -e "'AutoIt3.exe F1.au3';" Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Prabhu Posted October 13, 2009 Author Share Posted October 13, 2009 Zedna, I tried that as well. didn't help. Link to comment Share on other sites More sharing options...
Zedna Posted October 13, 2009 Share Posted October 13, 2009 Zedna, I tried that as well. didn't help.I don't understand why you don't compile your AU into EXE.Then you may easily call that EXE directly from anywhere. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
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