BoskoBuha Posted August 21, 2009 Share Posted August 21, 2009 Hi, I'm trying to execute another AutoIt script within a script. While using Execute(*.au3), the other script is opened within scritp editor and does not run. Default behaviour for doubleclick is run script.... I also tried using Run() with compiled script, but I don't get a response.... Any ideas? Cheers, Bostjan Link to comment Share on other sites More sharing options...
Firstone Posted August 21, 2009 Share Posted August 21, 2009 Hello there. Not sure If this is what ur after. For a script I'm currently working on, i needed an uncompiled script to run another uncompiled script. I used Run("AutoIt3.exe Scriptname.au3") for it. I'm pretty sure this will work for a compiled script opening a uncompiled script. Link to comment Share on other sites More sharing options...
jvanegmond Posted August 21, 2009 Share Posted August 21, 2009 You can only execute one line of code. The string parameter that you pass to Execute contains the one line of code, it should NOT be a location to a file.Example (from help file): $a=1 $v=Execute("$a+1") ; $v is set to 2The poster above me is right: You use Run. Example:$script = "C:\MyAu3Files\test.au3" Run(@AutoItExe & " /ErrorStdOut /AutoIt3ExecuteScript " & $script)More information is under help file: Command Line Parameters github.com/jvanegmond Link to comment Share on other sites More sharing options...
BoskoBuha Posted August 21, 2009 Author Share Posted August 21, 2009 Thanks, I actually need to run compiled script when script is final... Link to comment Share on other sites More sharing options...
Firstone Posted August 21, 2009 Share Posted August 21, 2009 In that case. If the scripts are in the same folder, you just need Run("Filename.exe"). Otherwise you need to include the file directory. Link to comment Share on other sites More sharing options...
BoskoBuha Posted August 21, 2009 Author Share Posted August 21, 2009 In that case.If the scripts are in the same folder, you just need Run("Filename.exe"). Otherwise you need to include the file directory.The thing is, I tried in the past and it didn't work, so I thought there was a catch ....I've just recoded and it works now....:-) I don't know what was wrong, but it must have been some typo....Thanks,Bostjan 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