venkat Posted July 1, 2009 Posted July 1, 2009 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
zac23 Posted July 1, 2009 Posted July 1, 2009 for one post ur script and we will see how u have tried to do it
venkat Posted July 1, 2009 Author Posted July 1, 2009 for one post ur script and we will see how u have tried to do itrun("C:\Documents and Settings\178000\Desktop\FIFTH1desk.au3")
martin Posted July 1, 2009 Posted July 1, 2009 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.
venkat Posted July 1, 2009 Author Posted July 1, 2009 $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
Suirad Posted July 1, 2009 Posted July 1, 2009 (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 July 1, 2009 by Suirad
martin Posted July 1, 2009 Posted July 1, 2009 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.
pikablue Posted July 1, 2009 Posted July 1, 2009 (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 July 1, 2009 by pikablue
Inverted Posted July 1, 2009 Posted July 1, 2009 au3 files aren't exeecutable files. Try ShellExecute
Kerros Posted July 1, 2009 Posted July 1, 2009 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.
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