Marjij Posted August 8, 2009 Share Posted August 8, 2009 Is this possible? If so why doesn't this work? I have a compiled script that is run by task scheduler which simply closes an open program and then runs this command, which resets and restarts but the new script doesn't start. It's not compiled because I still make changes periodically for improvement. Is it not possible to run an un-compiled (.au3) script from within another script? Run ("C:\Documents and Settings\UserName\Desktop\Script 1.26.au3", "C:\Documents and Settings\UserName\Desktop\") Thanks Link to comment Share on other sites More sharing options...
Marjij Posted August 8, 2009 Author Share Posted August 8, 2009 FAQ for the win: RunWait(@COMSPEC & " /c Start C:\Docume~1\UserName\Desktop\UserNa~1.au3") Link to comment Share on other sites More sharing options...
Danny35d Posted August 8, 2009 Share Posted August 8, 2009 Search the help file for /AutoIt3ExecuteScriptRun(@AutoItExe & ' /AutoIt3ExecuteScript C:\Docume~1\UserName\Desktop\UserNa~1.au3')NOTE: Correct usage of single- and double- quotation marks is important, even double single. AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
Mobius Posted August 8, 2009 Share Posted August 8, 2009 You can also do something like this if executing via AutoIt3.exe. $Rv = RunWait('"'& @AUTOITEXE &'" "'& @USERPROFILEDIR &'\Desktop\Script 1.26.au3"') ConsoleWrite("Au3 closed with an exit value of: "& $Rv & @LF) Using the afore mentioned quotation styles. Vlad Link to comment Share on other sites More sharing options...
herewasplato Posted August 8, 2009 Share Posted August 8, 2009 @Marjij, Welcome to the forum. FAQ for the win: RunWait(@COMSPEC & " /c Start C:\Docume~1\UserName\Desktop\UserNa~1.au3")I see that you found one of many ways to do this, but since it is an AU3 file, I think that #Include is the simplest method: #Include "C:\Documents and Settings\UserName\Desktop\Script 1.26.au3" You don't have to worry about double or single quotation marks and it handles the spaces in the path :-) [size="1"][font="Arial"].[u].[/u][/font][/size] 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