BoskoBuha Posted August 21, 2009 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
Firstone Posted August 21, 2009 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.
jvanegmond Posted August 21, 2009 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
BoskoBuha Posted August 21, 2009 Author Posted August 21, 2009 Thanks, I actually need to run compiled script when script is final...
Firstone Posted August 21, 2009 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.
BoskoBuha Posted August 21, 2009 Author 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
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