I Have clicked on save as option to save a file, while doing that I need to rename a file appending with sysdate. I have searched in google find the below one line of code:
FileMove("C:\somefile.txt", "C:\somefile1.txt"), When I am trying to append with sysdate. It is not happening. Please help me out with the small issue.
I get the "Unable to add resources" error related to AppData\Local\AutoIt v3\Aut2Exe when compiling with a large FileInstall of a 1.5GB file. Is there a size limit I need to be aware of? I've also disabled or removed Trend from three different machines and had the same results. I've had issues like this in the past but have compiled after the Aut2Exe folder was excluded in AV. That doesn't seem to be the problem this time around. If I comment out the FileInstall the script compiles successfully.
Suddenly a RunWait command has stop working after 2 years of no errors, issues, or problems. The code uses RunWait to start Plink.exe, a command-line remote connection tool similar to UNIX ssh. I'm using it to ssh to a linux (Centos) machine, run a Perl script, and redirect the output to a file on a PC running the AutoIt script.
$FilePath = "C:\AutoIT\LED" $FilePathPlus = $FilePath & "\plink.exe" $Code1 = RunWait(@ComSpec & " /c " & $FilePathPlus & " -ssh -l root -pw ?????? 10.170.4.163 /usr/local/nagios/etc/led.pl > C:\AutoIT\LED\led.txt ", @SW_SHOW) ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : @ComSpec & " /c " & $FilePathPlus & " -ssh -l root -pw ????? 10.170.4.163 /usr/local/nagios/etc/led.pl > C:\AutoIT\LED\led.txt " = ' & @ComSpec & " /c " & $FilePathPlus & " -ssh -l root -pw ?????? 10.170.4.163 /usr/local/nagios/etc/led.pl > C:\AutoIT\LED\led.txt " & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console The ConsoleWrite output when cut-n-pasted into a DOS box produces the expected file so I know it works. I've also tried many variations of the function moving, adding, and changing the " and ' (quote) marks. Also tried it without the @ComSpec macro and other related functions...e.g. ShellExecuteWait , etc.
The PC is a Windows 10 64bit and AutoIT is version 18.104.22.168.
Searching here and Google has not yielded any clues that helped.
Okay, this is exciting.
I'm proud to introduce CompileIt - an experimental compiler, that allows to compile AutoIt to machine code.
...Kind of. CompileIt does compilation in a similar way the Glasgow Haskell compiler does: translates the code into a lower-level language (in CompileIt's case it's C), and then compiles the code in that language.
Now, this project is still in its infancy, since, although it is simple to use, AutoIt is incredibly complex on the inside (automation, COM, etc.). So, CompileIt can compile only a very small subset of what we know as AutoIt.
Here's a list of things CompileIt (partially) supports (or not):
Numbers, booleans, strings Some built-in functions If, For and While statements Exporting DLL functions (you can now write DLL's in AutoIt, guys!) No arrays, automation, GUI or COM. A more detailed list is included with CompileIt.
GCC is required to compile scripts. After you extract the files, run CompileIt.exe and configure it to work with GCC.
Make sure you have GCC installed and configured within CompileIt before using.