Jump to content
Sign in to follow this  

Execute child Script

Recommended Posts



I'm doing this for execute child script

Func LaunchScript( $name )
    $dir = @ScriptDir & "\" & $name;
    $param = $name & ".au3";
    return ShellExecuteWait( @AutoItExe,  $dir & "\" & $param, $dir )   

But when I compiled this script the @AutoItExe constant pointing to the compiled exe file ! Is it possible to launch au3 child script with a compiled script ?

And an other question how to launch au3 script from VBS, me I'm using RegRead to find the AutoIt path and launching it :

'VBS Code
Set WshShell = WScript.CreateObject("WScript.Shell")
'Recherche le path de AutoIt
Dim autoItPath
autoItPath = WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt\InstallDir")
pathAut2Exe = autoItPath & "AutoIt3.exe"
WshShell.Exec( pathAut2Exe & " child.au3" )

Where's no magic function to do this ? :

'VBS code
Set oAutoIt = WScript.CreateObject("AutoItX3.Control")
oAutoIt.MagicFunction( "pathToScript.au3" )


Share this post

Link to post
Share on other sites

Look up /AutoIt3ExecuteScript

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post

Link to post
Share on other sites

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
Sign in to follow this