Jump to content
Sign in to follow this  
venkat

How to run a .au3 file from the autoit

Recommended Posts

venkat

Hi,

I have a .au3 file in d drive which should run after the script in c drive. how to run the script from a running script.

Thanks,

Venkatraman

Share this post


Link to post
Share on other sites
zac23

for one post ur script and we will see how u have tried to do it


Share this post


Link to post
Share on other sites
venkat

for one post ur script and we will see how u have tried to do it

run("C:\Documents and Settings\178000\Desktop\FIFTH1desk.au3")

Share this post


Link to post
Share on other sites
martin

run("C:\Documents and Settings\178000\Desktop\FIFTH1desk.au3")

$AutoItProdexePath = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "InstallDir");installDir for production
$AutoItBetaexePath = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "betaInstallDir");installDir for production
$AutoItexePath = $AutoItProdexePath;default to prod
$FullSCriptPath = "C:\Documents and Settings\178000\Desktop\FIFTH1desk.au3"
Run('"' & $AutoItexePath & '\AutoIt3.exe "' & ' "' & $FullSCriptPath & '"')

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
venkat

$AutoItProdexePath = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "InstallDir");installDir for production
$AutoItBetaexePath = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "betaInstallDir");installDir for production
$AutoItexePath = $AutoItProdexePath;default to prod
$FullSCriptPath = "C:\Documents and Settings\178000\Desktop\FIFTH1desk.au3"
Run('"' & $AutoItexePath & '\AutoIt3.exe "' & ' "' & $FullSCriptPath & '"')
It's not working

Share this post


Link to post
Share on other sites
Suirad

try this:

$file_loc = "C:\Documents and Settings\178000\Desktop\FIFTH1desk.au3"
 
If @Compiled = 1 Then
     $file_exe = FileGetShortName(@AutoItExe & ' /AutoIt3ExecuteScript "' & $file_loc & '"')
     Run($file_exe)
Else
     $file_au3 = FileGetShortName($file_loc)
     Run(@AutoItExe & " " & $file_au3, "", @SW_HIDE)
 EndIf

will work if your first script is compiled or not

Edited by Suirad

Share this post


Link to post
Share on other sites
martin

It's not working

"it's not working" is not guaranteed to get things moving is it? I mean a little information would have helped. :)

Maybe you didn't install AutoIt the way I did and you don't have those registry settings, in which case you should be able to substitute the correct path to AutIt3.exe.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
pikablue

Can someone explain to me why this code doesn't work?

run("C:\Location\File_name.au3")

does the file need to be compiled?

Edited by pikablue

Share this post


Link to post
Share on other sites
Inverted

au3 files aren't exeecutable files. Try ShellExecute

Share this post


Link to post
Share on other sites
Kerros

shell Execute is how I run an au3 file from a script.

ShellExecuteWait(@ProgramFilesDir & '\AutoIt3\Aut2Exe\Aut2exe.exe', ' /in C:\Documents and Settings\178000\Desktop\FIFTH1desk.au3')

Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.