Leaderboard
Popular Content
Showing content with the highest reputation on 01/16/2017 in all areas
-
This example works for me: 7-Zip -file: ÀÐØÞßƵɄʬЖЗДلنرشحჱჶẶỘ⅝⇈≽⋛⍓⍫♬✠⬔.7z Contains one txt-file: ÀÐØÞßƵɄʬЖЗДلنرشحჱჶẶỘ⅝⇈≽⋛⍓⍫♬✠⬔.txt With this content (UTF8): ÀÐØÞßƵɄʬЖЗДلنرشحჱჶẶỘ⅝⇈≽⋛⍓⍫♬✠⬔ ÀÐØÞßƵɄʬЖЗДلنرشحჱჶẶỘ⅝⇈≽⋛⍓⍫♬✠⬔ ÀÐØÞßƵɄʬЖЗДلنرشحჱჶẶỘ⅝⇈≽⋛⍓⍫♬✠⬔ ÀÐØÞßƵɄʬЖЗДلنرشحჱჶẶỘ⅝⇈≽⋛⍓⍫♬✠⬔ ÀÐØÞßƵɄʬЖЗДلنرشحჱჶẶỘ⅝⇈≽⋛⍓⍫♬✠⬔ ÀÐØÞßƵɄʬЖЗДلنرشحჱჶẶỘ⅝⇈≽⋛⍓⍫♬✠⬔ ÀÐØÞßƵɄʬЖЗДلنرشحჱჶẶỘ⅝⇈≽⋛⍓⍫♬✠⬔ ÀÐØÞßƵɄʬЖЗДلنرشحჱჶẶỘ⅝⇈≽⋛⍓⍫♬✠⬔ Output in SciTE: >Running:(3.3.14.2):E:\Program Files (x86)\AutoIt3\autoit3_x64.exe "...\Example.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop Number of Items: 1 All items: 0. ÀÐØÞß????????????????????????.txt, size = 587 bytes, isDir = False IArchiveExtractCallback_GetStream $index = 0 IArchiveExtractCallback_GetStream $sName = ÀÐØÞß????????????????????????.txt oIInArchive.Extract $hresult = 0x00000000 64 bit code works for me with a 64 bit version of 7z.dll as you can see in the SciTE output.2 points
-
Control Viewer - AutoIt Window Info Tool
mythicalzxc reacted to Yashied for a topic
LAST VERSION - 1.1 18-May-12 Control Viewer (CV) is a replacement of AutoIt Window Info with a number of advantages. I tried to stick to the interface of the last, so you almost do not have to be retrained. During testing, I never managed to find any controls that could not be identified by CV (on the contrary, shows a lot of hidden controls, especially for the system windows). The all program settings are stored in the following registry key: HKEY_CURRENT_USERSoftwareY'sControl Viewer The main differences CV from AWI Shows the complete list of all existing controls for the window that are interested (visible, hidden and deleted controls are displayed with different colors that can be changed to any other).Dynamically changing information during search for the windows and their controls.Ability to quickly switch between controls in the list.Ability to show/hide any controls from the list (useful for the overlaping controls).Information for the Style and ExStyle parameters shown in the form of hexadecimal values, and as its flags.Added the PID and Path parameters in the Window tab and ability to quickly open a folder that containing the process file.Added the coordinate system relative to the selected control.Shows a color of the selected pixel in RGB and BGR formats.Shows an example fill of the selected color.Ability to select the text encoding (affects the Text parameter in the Control tab).The complete change the appearance of pop-up frame for the selected controls.Simple and convenient tool to get a screenshot of the part screen of interest for publication on the forum (Capture tab).Create a report in the clipboard or a text file for subsequent publication on the forum.Search all running AutoIt scripts and their windows in the system (AutoIt tab).User-friendly interface. Used shortcuts Ctrl+Alt+T - Enable/Disable "Always On Top" mode (also available from the menu). Ctrl+Alt+H - Enable/Disable highlight selected controls (also available from the menu). Ctrl+A - Select all text (works in any input field). Ctrl - Hold down when moving the mouse to scroll the screenshot (Capture tab). Shift - Hold down when stretching/compression of the contour frame for an equilateral resizing screenshots (Capture tab). DoubleClick (on the screenshot) - Save the image to a file (Capture tab). DoubleClick (on any list item) - Open a folder with the file of the process or AutoIt script (AutoIt tab). Del (on any list item) - Close process (AutoIt tab). F5 - Updating the list (AutoIt tab). If anyone have any questions or comments about CV, please post it in this thread. I will be glad to any feedback and suggestions. Files to download Binary (x86 and x64) Redirection to CV_bin.zip, 1.14 MB CV_bin.html Source Redirection to CV_source.zip, 691 KB CV_source.html1 point -
After reading this post, I wanted to try to create the functions "Offline Registry Library" by myself. Fortunately, the functions look very similar to the "_WinAPI_RegXXX" functions. I will try to post some examples later. See Offline Registry Library Functions fro MSDN Here is this small UDF : WinAPIOfflineReg.au31 point
-
AutoIt OpenProgram, OpenFile, Run .exe's, CloseFile/Program, Repeat on a new file
DarylDixon reacted to Subz for a topic
@DarylDixon - Have you looked at Monarchs Built-in Automation? If you were to build a Model you could then use the command line options within Monarch to apply these models to your files http://docs.datawatch.com/monarch/commandline_guide/Datawatch_Monarch_Command_Line_User_Guide.pdf This would be the most resilient way for managing your documents rather than send keys and mouse movments.1 point -
AutoIt OpenProgram, OpenFile, Run .exe's, CloseFile/Program, Repeat on a new file
DarylDixon reacted to Melba23 for a topic
DarylDixon, This post of mine from yesterday might be of interest. M231 point -
Actually, it's native to Windows starting version 10. For older Windows it comes with the Windows Driver Kit (WDK). However, it's redistributable so you can add it to your script.1 point
-
No. You have to use RunWait Or ProcessWaitClose1 point
-
I've been playing with these interfaces today. Everything seems to be fine, but you need to add some error checking to the callback functions, and the integer structure which contains indices of files to extract must be used properly. List all items: ; List all items ConsoleWrite( "All items:" & @CRLF ) Local $sName, $iSize, $isDir For $i = 0 To $iCount - 1 $oIInArchive.GetProperty($i, $kpidPath, $sName) $oIInArchive.GetProperty($i, $kpidSize, $iSize) $oIInArchive.GetProperty($i, $kpidIsDir, $isDir) ConsoleWrite($i & ". " & $sName & ", size = " & $iSize & " bytes" & ", isDir = " & $isDir & @CRLF) Next ConsoleWrite( @CRLF ) Extract WinAll\beholder.inf: ; Extract WinAll\beholder.inf DirRemove( $7zExtractDir, 1 ) DirCreate($7zExtractDir) $bCreateSubfolders = True $tIndices = DllStructCreate( "int[1]" ) DllStructSetData( $tIndices, 1, 7, 1 ) ; Pass error check info and flags to IArchiveExtractCallback_GetStream IArchiveExtractCallback_GetStream( 0, $tIndices, $bCreateSubfolders, 0 ) ; Extract files and folders from archive through $oIArchiveExtractCallback $hResult = $oIInArchive.Extract( $tIndices, 1, 0, $oIArchiveExtractCallback ) ConsoleWrite( "oIInArchive.Extract $hresult = 0x" & Hex( $hResult ) & @CRLF ) ConsoleWrite( @CRLF ) Extract WinAll, WinAll\beholder.inf and www.SamLab.ws.url: ; Extract WinAll, WinAll\beholder.inf and www.SamLab.ws.url DirRemove( $7zExtractDir, 1 ) DirCreate($7zExtractDir) $bCreateSubfolders = False $tIndices = DllStructCreate( "int[3]" ) DllStructSetData( $tIndices, 1, 0, 1 ) DllStructSetData( $tIndices, 1, 7, 2 ) DllStructSetData( $tIndices, 1, 9, 3 ) ; Pass error check info and flags to IArchiveExtractCallback_GetStream IArchiveExtractCallback_GetStream( 0, $tIndices, $bCreateSubfolders, 0 ) ; Extract files and folders from archive through $oIArchiveExtractCallback $hResult = $oIInArchive.Extract( $tIndices, 3, 0, $oIArchiveExtractCallback ) ConsoleWrite( "oIInArchive.Extract $hresult = 0x" & Hex( $hResult ) & @CRLF ) ConsoleWrite( @CRLF ) IArchiveExtractCallback_GetStream in IArchiveExtractCallback.au3: Func IArchiveExtractCallback_GetStream($pSelf, $index, $outStream, $askExtractMode) Static $tIndices, $iCount, $iIdx, $bSubfolders If $pSelf = 0 Then $tIndices = $index $iCount = DllStructGetSize( $tIndices ) / 4 $iIdx = 1 $bSubfolders = $outStream Return EndIf If $iIdx <= $iCount And $index = DllStructGetData( $tIndices, 1, $iIdx ) Then ConsoleWrite( "IArchiveExtractCallback_GetStream $index = " & $index & @CRLF) Local $sName $oIInArchive.GetProperty($index, $kpidPath, $sName) ConsoleWrite("IArchiveExtractCallback_GetStream $sName = " & $sName & @CRLF) If $bSubfolders Then Local $sSubFolder = StringLeft( $sName, StringInStr( $sName, "\", 0, -1 ) - 1 ) If Not FileExists( $7zExtractDir & "\" & $sSubFolder ) Then _ DirCreate( $7zExtractDir & "\" & $sSubFolder ) EndIf $oIOutStream = 0 DeleteObjectFromTag($tIOutStream) $oIOutStream = ObjectFromTag("IOutStream_", $tagIOutStream, $tIOutStream, Default, $sIID_IOutStream) $oIOutStream.AddRef() $oIStreamOut = SHCreateStreamOnFile($7zExtractDir & $sName, 0x00001000 + 2) Local $tStruct = DllStructCreate("ptr", $outStream) Local $Stream = $oIOutStream() $oIOutStream.AddRef() DllStructSetData($tStruct, 1, $Stream) $iIdx += 1 EndIf Return $S_OK EndFunc IOutStream_Write in IOutStream.au3: Func IOutStream_Write($pSelf, $pData, $iSize, $iProcessedSize) If IsObj( $oIStreamOut ) Then Return $oIStreamOut.Write($pData, $iSize, $iProcessedSize) EndFunc Output in SciTE: Number of Items: 10 All items: 0. WinAll, size = 0 bytes, isDir = True 1. WinAll\amd64.cab, size = 418789 bytes, isDir = False 2. WinAll\i386.cab, size = 358996 bytes, isDir = False 3. WinAll\beholder.bin, size = 281569 bytes, isDir = False 4. WinAll\Install.exe, size = 75072 bytes, isDir = False 5. WinAll\install.x64, size = 84480 bytes, isDir = False 6. WinAll\beholder.cat, size = 22413 bytes, isDir = False 7. WinAll\beholder.inf, size = 20452 bytes, isDir = False 8. Beholder.nfo, size = 738 bytes, isDir = False 9. www.SamLab.ws.url, size = 94 bytes, isDir = False IArchiveExtractCallback_GetStream $index = 7 IArchiveExtractCallback_GetStream $sName = WinAll\beholder.inf oIInArchive.Extract $hresult = 0x00000000 IArchiveExtractCallback_GetStream $index = 0 IArchiveExtractCallback_GetStream $sName = WinAll IArchiveExtractCallback_GetStream $index = 7 IArchiveExtractCallback_GetStream $sName = WinAll\beholder.inf IArchiveExtractCallback_GetStream $index = 9 IArchiveExtractCallback_GetStream $sName = www.SamLab.ws.url oIInArchive.Extract $hresult = 0x00000000 All code is included in the zip. Run Example.au3. You need 7z.dll and 7z_Extract_Example.7z from the zip in the post above (end of line 2). 7-ZipCode.7z1 point
-
Very interesting post ! Here is, I think, a start point : Func _WinAPI_ORCloseKey($hKey) Local $aRet = DllCall("Offreg.dll", "dword", "ORCloseKey", "handle", $hKey) If @error Then Return SetError(@error, @extended, '') If $aRet[0] Then Return SetError(10, $aRet[0], '') Return 1 EndFunc Func _WinAPI_ORCloseHive($hHive) Local $aRet = DllCall("Offreg.dll", "dword", "ORCloseHive", "handle", $hHive) If @error Then Return SetError(@error, @extended, '') If $aRet[0] Then Return SetError(10, $aRet[0], '') Return 1 EndFunc Func _WinAPI_OREnumKey($hKey, $iIndex) Local $aRet = DllCall("Offreg.dll", "dword", "OREnumKey", "handle", $hKey, "dword", $iIndex, "wstr", "", "dword*", 256, "ptr", 0, "ptr", 0, 'ptr', 0) If @error Then Return SetError(@error, @extended, '') If $aRet[0] Then Return SetError(10, $aRet[0], '') Return $aRet[3] EndFunc Func _WinAPI_OREnumValue($hKey, $iIndex) Local $aRet = DllCall("Offreg.dll", "dword", "OREnumValue", "handle", $hKey, "dword", $iIndex, "wstr", "", "dword*", 16384, "ptr", 0, "ptr", 0, 'ptr', 0) If @error Then Return SetError(@error, @extended, '') If $aRet[0] Then Return SetError(10, $aRet[0], '') Return $aRet[3] EndFunc Func _WinAPI_OROpenHive($sHivePath) Local $aRet = DllCall("Offreg.dll", "dword", "OROpenHive", "wstr", $sHivePath, "handle*", 0) If @error Then Return SetError(@error, @extended, 0) If $aRet[0] Then Return SetError(10, $aRet[0], 0) Return $aRet[2] EndFunc Func _WinAPI_OROpenKey($hHive, $sSubKey) Local $aRet = DllCall("Offreg.dll", "dword", "OROpenKey", "handle", $hHive, "wstr", $sSubKey, "handle*", 0) If @error Then Return SetError(@error, @extended, 0) If $aRet[0] Then Return SetError(10, $aRet[0], 0) Return $aRet[3] EndFunc I did not manage to build the _WinAPI_ORGetValue function. I'm not quite comfortable with that yet.1 point
-
I think the string comparison converts the character to its decimal equivalent before comparing... just a guess, I have not done any SQL1 point
-
How to post code on the forum
FrancescoDiMuro reacted to Jon for a topic
1 point