Leaderboard
Popular Content
Showing content with the highest reputation on 12/04/2017 in all areas
-
Hello. I was needing to zip and unzip some folders. So I found an easy way using CLR. here a simple example. #include ".\Includes\CLR.au3" #include ".\Includes\CLR Constants.au3" Local $oAssembly = _CLR_LoadLibrary("System.IO.Compression.FileSystem") ConsoleWrite("!$oAssembly: " & IsObj($oAssembly) & @CRLF) Local $pAssemblyType = 0 $oAssembly.GetType_2("System.IO.Compression.ZipFile", $pAssemblyType) ConsoleWrite("$pAssemblyType = " & Ptr($pAssemblyType) & @CRLF) Local $oAssemblyType = ObjCreateInterface($pAssemblyType, $sIID_IType, $sTag_IType) ConsoleWrite("IsObj( $oAssemblyType ) = " & IsObj($oAssemblyType) & @CRLF) Local $sInputFolder="C:\Users\Raziel\Desktop\Files" Local $sOutZipFile="C:\Users\Raziel\Desktop\Files.zip" Local $aArray[] = [$sInputFolder,$sOutZipFile] Local $Return = 0 ;compress $oAssemblyType.InvokeMember_3("CreateFromDirectory", 0x158, 0, 0, CreateSafeArray($aArray), $Return) Local $aArray[] = [$sOutZipFile,$sInputFolder & "-Extracted"] ;decompress $oAssemblyType.InvokeMember_3("ExtractToDirectory", 0x158, 0, 0, CreateSafeArray($aArray), $Return) Exit Saludos3 points
-
TeraCopy Timer - A program of mine, front end really, that I have been working on (on & off) for some time, but not shared here before, that I recall. Third party program TeraCopy is required. Many of you will be familiar with TeraCopy, and it has been discussed here at AF on several occasions, in various sub forums, including Chat. BE ADVISED - I still use an older version of TeraCopy (v2.27), a goody but an oldy, so have only tested my program with that. It may work with the newer v3.xx, or may be easily adjusted to do so, but I have not yet gone that route. Likewise, I only use it with Win 7 and Win XP, but I don't imagine there should be any issues with newer Windows. Add to that, my program being devised and created in AutoIt v3.3.0.0. So what is TeraCopy Timer and why might you need it? -------------------------------------------------------------------------------------- Those familiar with TeraCopy use, know you can run multiple copy or move jobs either simultaneously or concurrently (one immediately after another has finished). With the free version at least, you have no control over precise order or timing, and no way to deal (without manual interaction) with the pesky Thumbs.db files in Win XP. TeraCopy Timer allows you to do all those things, and in a batch fashion. -------------------------------------------------------------------------------------- Some screenshots and brief explanation Main Window Minimalist Window This new WAIT feature is the simplest and best way to use the program generally (in my view) ... but check out the following, as it is not always the case. Advanced Delay Window WARNING - It should go without saying, that you take all the usual precautions. For instance, don't use move with the only copy you have of precious files. BACKUP BACKUP BACKUP! Don't hold me liable for anything, except for being a nice guy who likes to share. TeraCopy Timer v3.5.zip (MAJOR UPDATE - see detail at Post #39) Enjoy! OLDER DOWNLOADS P.S. I am not affiliated in any way with those who created and provide the excellent third party program - TeraCopy.2 points
-
Autoit Hash-based message authentication code request
cezarlacatus and one other reacted to JLogan3o13 for a topic
@cezarlacatus As has been mentioned, keep it to one thread.2 points -
.NET Common Language Runtime (CLR) Framework
Earthshine and one other reacted to ptrex for a topic
@Danyfirex Thanks for sharing... good to see someone is still posting something useful2 points -
.NET Common Language Runtime (CLR) Framework
Earthshine and one other reacted to Danyfirex for a topic
@antonioj84 I really don't now you should take a look at System.IO.Compression.ZipFile in msdn. I just need to zip a folder without take care of compression level. Saludos2 points -
Hi guys! I took @GaryFrost's Scripting Dictionary UDF and made just a few modifications. It now accepts multiple Scripting Dictionary objects around your script (many at once) and also allows you to choose any name for your variable. Also, it now uses OOP-like approach as proposed by @guinness. The modifications were too simple (and I would post it on the original thread, but it's dated 2007) so all credit goes to @GaryFrost. Example: #include 'scriptingdic.au3' #include <Array.au3> ; Needed only for _ArrayDisplay, and not required by the lib ; Init the object $oObj = _InitDictionary() ; Adding a single value _AddItem($oObj, 0, "Test") ; And showing it msgbox(0, '', _Item($oObj, 0)) ; Adding an array Dim $aArr[] = [0, -80, -49, -44, 80, 100, 8, 7, 6, 5, 4, 3, 2, 1] _AddItem($oObj, 1, $aArr) ; And showing it _ArrayDisplay(_Item($oObj, 1)) ; We can also use this approach: $oObj3 = _InitDictionary() $oObj.Add("test", "foo") MsgBox(0, '', $oObj.Item("test")) Download: scriptingdic.au31 point
-
Autoit Hash-based message authentication code request
Earthshine reacted to JLogan3o13 for a topic
Why does that thread not work for you? You state "I can't use it", what does that mean? What did you try and what did not work for you? Please be aware that this forum is dedicated to helping people improve their own scripts; it is not a place where you put in a request and someone does all the work for you. If you're encountering issues you need to: Explain in detail what you have tried, and what is not working.1 point -
How do I overcome quotes?
Earthshine reacted to JLogan3o13 for a topic
Prank scripts are also against the forum rules, aside from being stupid and childish. Thread locked. Please read the forum rules before you post again.1 point -
Search WMIC for installed software
Earthshine reacted to iamtheky for a topic
For every app on every computer you are opening a file, writing a line, and closing the file? How about write that object to an array or one big ass string, then only once per computer (or with only 155 computers you could probably just concatenate them all) perform a _FileWriteFromArray. Try and do as little as possible in the loops, and for sure dont go opening and closing files until necessary. Also, powershell does the same shit, only slower since you would be asking autoit to ask powershell to ask WMI about the installed software. Do you have an SCCM, that speeds this up greatly as we could just ask that?1 point -
Autoit Hash-based message authentication code request
cezarlacatus reacted to Earthshine for a topic
have you checked the help file? is this link of any use?1 point -
Search WMIC for installed software
Earthshine reacted to antmar904 for a topic
Is there a way to make this faster? I am searching about 155 remote computers and this can take one hour sometimes longer. #include <Array.au3> #include <AutoITConstants.au3> #include <Timers.au3> ;From JLogan3o13 @ https://www.autoitscript.com/forum/topic/191287-search-wmic-for-installed-software/ Local $sAppName, $oWMI, $aSystem, $ComputerList = @ScriptDir & "\ComputerNames.txt", $LogFile = @ScriptDir & "\" & @MON & "" & @MDAY & "" & @YEAR & "_" & @HOUR & "_" & @MIN & "_LogFile.txt", $sPC = FileReadToArray($ComputerList) _ArrayDisplay($sPC) ;Debug Local $StartTime = _Timer_Init() If Not FileExists($ComputerList) Then MsgBox(48, "Error", "Missing the computer list file : " & @CRLF & $ComputerList & @CRLF & @CRLF & "Please make sure it exist then run the script again.") Exit EndIf FileWriteLine($LogFile, @CRLF) FileWriteLine($LogFile, @MON & "/" & @MDAY & "/" & @YEAR & " - " & @HOUR & ":" & @MIN & ":" & @SEC & " Software Check Started" & @CRLF) ;$sPC = "<Computer Name>" $sAppName = ".Net" For $i = 0 To UBound($sPC) - 1 If Ping($sPC, 250) Then $oWMI = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & $sPC[$i] & "\root\cimv2") If IsObj($oWMI) Then $aSystem = $oWMI.ExecQuery("Select * from Win32_Product") For $oApp In $aSystem ;If StringInStr($oApp.Name, $sAppName) Then ConsoleWrite($sPC[$i] & "Application: " & $oApp.Name & "Version: " & $oApp.Version & @CRLF) If StringInStr($oApp.Name, $sAppName) Then FileWriteLine($LogFile, $sPC[$i] & "," & $oApp.Name & "," & $oApp.Version & @CRLF) Next Else ;ConsoleWrite("Unable to connect to WMI on " & $sPC[$i] & @CRLF) FileWriteLine($LogFile, $sPC[$i] & "," & "Offline" & @CRLF) EndIf EndIf Next FileWriteLine($LogFile, @MON & "/" & @MDAY & "/" & @YEAR & " - " & @HOUR & ":" & @MIN & ":" & @SEC & " Software Check Completed." & @CRLF) Local $DiffTime = _Timer_Diff($StartTime) Local $EndTime = $DiffTime / 60000 Local $sTime = StringTrimRight($EndTime, 12) MsgBox(0, "", "Total Runtime: " & $sTime & " Minute") Exit1 point -
relative filespec vs absolute filespec
Earthshine reacted to SlackerAl for a topic
What about _PathGetRelative ?1 point -
When I populate an edit control before GuiSetState() the data in the edit control is highlighted (selected?). When I run GuiSetState() before populating the edit control the data is NOT highlighted. Is this expected behavior? #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Local $gui010 = GUICreate('Static CTL Example') Local $edt010 = GUICtrlCreateEdit('', 10, 10, 380, 380, BitOR($ES_READONLY, $WS_VSCROLL)) GUISetState() For $1 = 1 To 300 GUICtrlSetData($edt010, 'Line ' & StringFormat('%04i', $1) & @CRLF, 1) Next ;GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd kylomas1 point
-
.NET Common Language Runtime (CLR) Framework
antonioj84 reacted to ptrex for a topic
@antonioj84 , The compression will propably be the same since the ZIP.AU3 using the same windows build in classes. The ZIP.AU3 UDF use the traditional COM approach, while the .NET version use the CLR framework to access the classes. The main difference will be speed I guess... where the CLR might win over tradinational COM approach. You can do a simple test to compress using both approaches and compress speed and compression rate... easy to find out.1 point -
I think is expected. It happens to me in C# too. Saludos1 point
-
Ha ha, excellent, thanks for that .... I notice my blue star for Bookmarks lit up when I followed the link, so I did bookmark it. Thanks for saving me having to search.1 point
-
It was this site: https://www.backblaze.com/blog/what-hard-drive-should-i-buy/ My dead drive is a Seagate Barracuda. Validating the data at BackBlaze to me at least xD.1 point
-
As you know, my harddrive recently failed and there was a large file transfer to it just before the drive died. I'll be using this program when I get a new hard drive and transfer heaps of data to it. Being able to schedule pauses during writes will hopefully prevent me from overheating another drive. (If that is what caused the fail) Thank you for providing this.1 point
-
.NET Common Language Runtime (CLR) Framework
Earthshine reacted to antonioj84 for a topic
About zip.au3 is the compression ratio better using your method above ?1 point -
1 point
-
@Skysnake Why dont you use Internet Explorer to display the pdf ?1 point
-
Easily obtain silent install scripts for use in deployments
Earthshine reacted to MattHiggs for a topic
Hey all. This may be common sense to some of you, but I thought I would share how you can easily obtain silent install scripts, or the resources pertaining to those install scripts (to allow you to create your own, custom software deployments) easily and for free. This requires that at least one computer somewhere has chocolatey (https://chocolatey.org/) installed. Now lets take, for example, adobe flash player. Normally, obtaining the installer involves getting a license from adobe (or something similar to that) to gain access to the msi installer for flash player (which allows for silent installation). Instead of doing that though, on our "chocolatey" computer, lets go ahead and install flash player: 1. Open command prompt with admin credentials 2) type "choco install flashplayerplugin -y" and press Enter Once the process is complete, (making sure that you are able to "view hidden items" in Windows explorer) navigate to C:\ProgramData\chocolatey\lib\[name_of_application_installed]\tools. This folder contains the script (chocolateyinstall.ps1) which was used to install adobe flash player to your machine, which also includes (for those who just want the msi file) the URL used to download the flashplayer msi to your machine. Alternatively, you could do a search (I use "Everything" by voidtools.com) for msi packages on your machine (*.msi in search bar) and find the one that says adobe flash player somewhere (the reason I use * is so that I don't miss it because I got the name wrong, but more likely than not, it is somewhere in AppData directory). So now not only do you have the script which contains the logic to perform the silent install of the software, but you have access to the URL and files themselves used to make it happen, which is invaluable in the event you want to incorporate your own custom tasks into an installation. Have a blast.1 point -
how to check if button is enabled or not
Leendert-Jan reacted to Yashied for a topic
ControlCommand($hWnd, '', $controlID, 'IsEnabled')1 point