DarioR Posted February 9, 2022 Posted February 9, 2022 On 1/2/2022 at 1:01 PM, Exit said: Rearranged the code. No functional changes. Just reload the code from post #1 (click on my signature) Hey bro! i've been following your job for a while, it's amazing and just what I needed... This new version finally avoids all malware detection!! But... with the main program I need to run, it just fails in compilation or something. it shows this message Do you happen to know what could it be? .exe file runs fine, as well as .au3. What is Au3check.exe checking actually? can we disable it? Really really need this to get to work, please! Thanks!!
DarioR Posted February 9, 2022 Posted February 9, 2022 2 hours ago, DarioR said: Hey bro! i've been following your job for a while, it's amazing and just what I needed... This new version finally avoids all malware detection!! But... with the main program I need to run, it just fails in compilation or something. it shows this message Do you happen to know what could it be? .exe file runs fine, as well as .au3. What is Au3check.exe checking actually? can we disable it? Really really need this to get to work, please! Thanks!! stupid me... I was running the program in a separate folder as I remember your previous version was not running if folder name had 'spaces', so I was copying in a temp folder, but was missing some other important files the program summons... Disregard my previous message. It works flawlessly!!! Thank you so much!! Exit 1
Exit Posted February 9, 2022 Author Posted February 9, 2022 5 hours ago, DarioR said: I was running the program in a separate folder as I remember your previous version was not running if folder name had 'spaces' The current version may have 'spaces' in folder and filename. App: Au3toCmd UDF: _SingleScript()
MightyWeird Posted February 16, 2022 Posted February 16, 2022 (edited) Hi, I just tried the new version, but I run into a problem. My scripts needs external files (like logos / jpg files, but when I execute the CMD the script can't access the files. I dont't know how to debug this. Can it be that the script is run in another folder than where it was executed? Thank you Edited February 16, 2022 by MightyWeird
Exit Posted February 17, 2022 Author Posted February 17, 2022 @MightyWeird Please change line 37 from Global $_a2c_Debug =0 ; change to '1' for debugging informations on output console to Global $_a2c_Debug =1 ; change to '1' for debugging informations on output console and show the complete console log in a spoiler. App: Au3toCmd UDF: _SingleScript()
MightyWeird Posted February 18, 2022 Posted February 18, 2022 Hi, Here it is Spoiler >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /beta /ErrorStdOut /in "C:\Users\Eigenaar\Desktop\auto2cm.au3" /UserParams +>12:28:15 Starting AutoIt3Wrapper (19.1127.1402.0} from:SciTE.exe (4.2.0.0) Keyboard:00020409 OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0413) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\Eigenaar\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\Eigenaar\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.14.5) params:-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 from:C:\Program Files (x86)\AutoIt3 input:C:\Users\Eigenaar\Desktop\auto2cm.au3 +>12:28:15 AU3Check ended.rc:0 >Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "C:\Users\Eigenaar\Desktop\auto2cm.au3" +>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+BREAK to Stop. ============ Start of DebugInfo =============== Au3toCmd Version: 2022.01.11 @ScriptFullPath: C:\Users\Eigenaar\Desktop\auto2cm.au3 @AutoItExe: C:\Program Files (x86)\AutoIt3\autoit3_x64.exe @AutoItVersion: 3.3.14.5 @AutoItX64: 1 @CPUArch: X64 @OSArch: X64 @OSBuild: 19042 @OSLang: 0413 @OSType: WIN32_NT @OSVersion: WIN_10 @OSServicePack: @UserName: Eigenaar @UserProfileDir: C:\Users\Eigenaar ============ End of DebugInfo =============== Sourcepath: C:\Users\Eigenaar\Desktop\test1\416.au3 IconNumber: 132 IconPath: C:\WINDOWS\system32\shell32.dll Regread A3Dir: C:\Program Files (x86)\AutoIt3 Version: v3.3.14.5 X64: >0< beta: >0< A3Dir: C:\Program Files (x86)\AutoIt3 $sTargetpath: C:\Users\Eigenaar\Desktop\test1\416.cmd +>12:28:23 AutoIt3.exe ended.rc:0 +>12:28:23 AutoIt3Wrapper Finished. >Exit code: 0 Time: 8.501
Exit Posted February 18, 2022 Author Posted February 18, 2022 On 2/16/2022 at 12:02 PM, MightyWeird said: My scripts needs external files (like logos / jpg files did you integrate the external files via fileinstall? If not, did you address the files via fullpath? If not, please specify the files per full path or specify the appropriate directory as the working directory in the script beforehand. App: Au3toCmd UDF: _SingleScript()
MightyWeird Posted February 21, 2022 Posted February 21, 2022 I use "@scriptdir" a lot in my script. When I run the cmd, the @scriptdir refers to the "syswow64" folder. (the current working folder used by auto3cmd) I fixed my script by specifying the correct folder with "FileChangeDir" and replacing the "@scriptdir" to "@workingdir" Seems to work fine now. Thank you. Exit 1
Exit Posted February 21, 2022 Author Posted February 21, 2022 35 minutes ago, MightyWeird said: Seems to work fine now. I'm happy to help clarifing the problem. 🙂 App: Au3toCmd UDF: _SingleScript()
Exit Posted March 13, 2022 Author Posted March 13, 2022 I have successfully tested Au3toCmd in Windows 11 with AutoIt 3.3.16.0. If anyone still finds errors, please report them here. Here is a hint for easier use in the SciTE Editor. If you add the following line in the SciTEUser.properties file, you can run Au3toCmd via F7 (build) in the SciTE Editor: command.build.*.au3=start "anytitle" "C:\Users\...path to your...\Au3toCmd.au3" "$(FileNameExt)" A CMD file is created instead of an EXE file. App: Au3toCmd UDF: _SingleScript()
Exit Posted April 1, 2022 Author Posted April 1, 2022 New version in first post. Musashi 1 App: Au3toCmd UDF: _SingleScript()
Deathdn Posted May 5, 2022 Posted May 5, 2022 (edited) I have a problem, when program run, @ScriptDir will change to %appdata%\Au3toCmd\a3x So my other data is not correct. Does .cmd file need to decode to .a3x again? I can't change @ScriptDir to @WorkingDir cuz path will be different when running in other PC. Problem is if run in my PC, I can control Windows Defend, AV ..., so dont required to compile to .cmd. But when my program wanna be used by others, the path is not correct. Edited May 5, 2022 by Deathdn
Exit Posted May 7, 2022 Author Posted May 7, 2022 (edited) >> I have a problem, when program run, @ScriptDir will change to %appdata%\Au3toCmd\a3x This problem can be solved using macro @compiled. >> So my other data is not correct. Does .cmd file need to decode to .a3x again? Yes. CMD file contains only a base64 encoded version of the A3X file. But this decoding is done only when the CMD file is new or has changed. Otherwiise, the content of the %appdata%\Au3toCmd\a3x directory is used. >> I can't change @ScriptDir to @WorkingDir cuz path will be different when running in other PC. >> Problem is if run in my PC, I can control Windows Defend, AV ..., so dont required to compile to .cmd. But when my program wanna be used by >> others, the path is not correct Just use the @compiled macro to set your working directory to the correct value. Edited May 7, 2022 by Exit App: Au3toCmd UDF: _SingleScript()
Exit Posted May 8, 2022 Author Posted May 8, 2022 New version 2022.05.08 in first post Changed initial working directory to location of *.cmd file. Musashi 1 App: Au3toCmd UDF: _SingleScript()
Exit Posted May 12, 2022 Author Posted May 12, 2022 Version: 2022.05.12 (Support blanks in pathnames) argumentum and MightyWeird 2 App: Au3toCmd UDF: _SingleScript()
obiwanceleri Posted June 13, 2022 Posted June 13, 2022 Hey works like a charm! Awesome programming A question. Have you tried to replace CRLF by LF in the final .CMD file? (I did it with Notepad++ and it works BTW) 20 kilobytes is 20 kilobytes Exit 1 Help a newbie, comment your code!
Exit Posted June 14, 2022 Author Posted June 14, 2022 (edited) On 6/13/2022 at 9:20 PM, obiwanceleri said: Have you tried to replace CRLF by LF in the final .CMD file? No, since CRLF is the standard in Windows. Edit: Yes. implemented in version 2022.06.22. On 6/13/2022 at 9:20 PM, obiwanceleri said: Awesome programming Thank you for the compliment Edited June 22, 2022 by Exit App: Au3toCmd UDF: _SingleScript()
Exit Posted June 22, 2022 Author Posted June 22, 2022 (edited) New version in first post Version: 2022.06.23 - Support release candidates. They have the same version number as the final version. - Changed @CrLf to @Lf. Thanks to @obiwanceleri - Refresh Appdata\Au3toCmd\* once in year - Optimized #AutoIt3Wrapper handling. Leading blanks supported. Edited June 22, 2022 by Exit Musashi 1 App: Au3toCmd UDF: _SingleScript()
argumentum Posted June 22, 2022 Posted June 22, 2022 On 1/29/2020 at 2:46 PM, Exit said: Version: 2022.06.22 "C:\Users\Tester\Downloads\Au3toCmd(2022.06.22).au3"(96,304) : error: syntax error If ShellExecuteWait($sA3Dir & "\Aut2Exe\Aut2exe" & ($x64 ? '_x64' : '') & ".exe", "/In """ & $sSourcepath & """ /out """ & $sTargetpath & ".sa3x"" " & ($x64 ? '/X64' : ' ')) Then Return SetError(11, MsgBox(16 + 262144, Default, "Error : Cannot create target file """ & $sTargetpath & ".sa3x"" ", 0), 0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\Tester\Downloads\Au3toCmd(2022.06.22).au3"(147,33) : warning: $th possibly not declared/created yet $th = FileOpen($sTargetpath, 2) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ No big deal. Thanks for the update. Exit 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Exit Posted June 22, 2022 Author Posted June 22, 2022 Oops, there must have been a typo. New version in the first post. Thanks to @argumentum argumentum 1 App: Au3toCmd UDF: _SingleScript()
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