Jump to content

How to run a .au3 file from the autoit


Recommended Posts

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.
Link to comment
Share on other sites

$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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

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