Jump to content

Recommended Posts

Posted

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

Posted

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")

Posted

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.
Posted

$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
Posted (edited)

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
Posted

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.
Posted (edited)

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
Posted

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.

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...