olmanRvr Posted October 17, 2016 Share Posted October 17, 2016 Hello Everybody, I have a .au3 script.I'm trying to compile this script(compinfo2.au3) by the following code(2 different scripts).Running these shows no error but the .au3 file is not compiled.Please someone help me. ;SCRIPT1 Local $LocationAut2Exe = @ProgramFilesDir &'\AutoIt3\Aut2Exe\Aut2Exe.exe' Run(' "C:\Users\pradeep\Desktop\compInfo2.au3' & $LocationAut2Exe & 'C:\Users\pradeep\Desktop\compInfo2.exe "?') ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ;SCRIPT2 ShellExecute ( @ScriptDir & '\Aut2Exe\Aut2exe.exe', ' /in "' & @Scriptdir & '\compInfo2.au3" /comp 4' ) Link to comment Share on other sites More sharing options...
Developers Jos Posted October 17, 2016 Developers Share Posted October 17, 2016 What should script 1 do as that doesn't make much sense? Script2: Is the compiler really located as subdirectory of the scriptdir? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ThioFoX Posted October 17, 2016 Share Posted October 17, 2016 (edited) ;SCRIPT1 $sPathAut2Exe = @ProgramFilesDir & "\AutoIt3\Aut2Exe\Aut2exe.exe" If Not FileExists($sPathAut2Exe) Then MsgBox(4096, "Error", "Aut2Exe not found") $sScript = @DesktopDir & '\compInfo2.au3' If Not FileExists($sScript) Then MsgBox(4096, "Error", "Script not found") Run(@AutoItExe & " " & $sScript) ;Runs compInfo2.au3(not compiled) and script compInfo2.au3 will compile the script ;SCRIPT2 = @DesktopDir & '\compInfo2.au3' $sPathAut2Exe = @ProgramFilesDir & "\AutoIt3\Aut2Exe\Aut2exe.exe" If Not FileExists($sPathAut2Exe) Then MsgBox(4096, "Error", "Aut2Exe not found") $sScript = @DesktopDir & '\compInfo2.au3' If Not FileExists($sScript) Then MsgBox(4096, "Error", "Script not found") If Not @Compiled Then Run($sPathAut2Exe & ' /IN "' & $sScript & '" /COMP 4') Else MsgBox(4096, "Ops", "I'm already compiled!") EndIf Edited October 17, 2016 by ThioFoX Link to comment Share on other sites More sharing options...
olmanRvr Posted October 18, 2016 Author Share Posted October 18, 2016 Hi, Thanks for your reply.I have this script compInfo2.au3 om the desktop, which I want to compile programatically. The compiler(Auto2Exe.exe) is at ---->Program Files\Autoit3\Auto2Exe\Auto2Exe.exe. Script1 is just running compInfo2.au3 and outputs the results,but not compiling it. Script2 as shown below(of TheoFox) is working perfectly. ;SCRIPT2 = @DesktopDir & '\compInfo2.au3' $sPathAut2Exe = @ProgramFilesDir & "\AutoIt3\Aut2Exe\Aut2exe.exe" If Not FileExists($sPathAut2Exe) Then MsgBox(4096, "Error", "Aut2Exe not found") $sScript = @DesktopDir & '\compInfo2.au3' If Not FileExists($sScript) Then MsgBox(4096, "Error", "Script not found") If Not @Compiled Then Run($sPathAut2Exe & ' /IN "' & $sScript & '" /COMP 4') Else MsgBox(4096, "Ops", "I'm already compiled!") EndIf So issue may be considered resolved. Thanks a lot TheoFox & Jos for all the help. cheers olmar Link to comment Share on other sites More sharing options...
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