Jump to content

Recommended Posts

Posted

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

Posted

Search the help file for /AutoIt3ExecuteScript

Run(@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
Posted

@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]

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...