Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/14/2025 in Posts

  1. I guess I'm mixing too many different program languages these days, so goofed up pretty much with that last version. Anyway, it should be fixed with the latest Beta installer containing an update for AutoIt3Wrapper v25.205.1420.2 ... and did test properly this time.
    4 points
  2. Nine

    Windows Debug Messages?

    Interesting usage of Security Descriptor/Attribute. I wouldn't have thought of using it this way. I need to dig a bit more to fully understand the intrinsic. But in any case, at first glance, there is no need to have a DLL or C++ to perform the task. All I have seen is simple calls to WinAPI. Everything could be performed inside AutoIt (like I said at first glance). I will look into this later today and come back.
    2 points
  3. I can't divulge everything of the meeting with the department of child safety, and will not over the internet, but let's just say today was the first big day of more to come, and tilted greatly in my favor. 😁
    2 points
  4. Definately working, x86 and x64. I modified your script slightly: Removed the Example function. Saved the Script as DebugCapture.au3 (Your script is now used as a UDF) Then I slighty modified Autoitter's DebugViewer script: ;=================================================================================================== ; ; Script Name : DebugViewer ; ; Script Function : Example using the DebugCapture UDF ; ; Link : https://www.autoitscript.com/forum/topic/82889-capture-debug-information-udf/ ; ; AutoIt Version : 3.2.12.1 ; Script version : 1.0 ; Date : 19-10-2008 ; Author : Steven Scholte (a.k.a. autoitter) ; ;=================================================================================================== AutoItSetOption("MustDeclareVars", 1) AutoItSetOption("TrayAutoPause", 0) #include "DebugCapture.au3" #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <WindowsConstants.au3> #include "GuiListView.au3" Global $MainForm = GUICreate("Debug Viewer", 600, 300, -1, -1) Global $ListViewDebug = GUICtrlCreateListView("Time|PID|Debug Output", 16, 17, 571, 212) GUICtrlSendMsg($ListViewDebug, 0x101E, 0, 60) GUICtrlSendMsg($ListViewDebug, 0x101E, 1, 50) GUICtrlSendMsg($ListViewDebug, 0x101E, 2, 440) Global $ButtonStart = GUICtrlCreateButton("Start", 417, 250, 75, 30, 0) Global $ButtonStop = GUICtrlCreateButton("Stop", 505, 250, 75, 30, 0) GUICtrlSetState($ButtonStop, $GUI_DISABLE) GUISetState(@SW_SHOW) ; Global variables Global $bCapturing = False Global $iIndex Global $iPid Global $strData ; Main loop While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE If $bCapturing Then StopDebugCapture() Exit Case $ButtonStart StartCapture() Case $ButtonStop StopCapture() EndSwitch If $bCapturing Then $strData = GetDebugOutput() If (Not @error) And ($strData <> "") Then $iPid = @extended $iIndex = _GUICtrlListView_AddItem($ListViewDebug, @HOUR & ":" & @MIN & ":" & @SEC) ; Add time _GUICtrlListView_AddSubItem($ListViewDebug, $iIndex, $iPid, 1) ; Add PID _GUICtrlListView_AddSubItem($ListViewDebug, $iIndex, StringStripWS($strData, 2), 2) ; Add debug information (remove trailing CR/LF) _GUICtrlListView_EnsureVisible($ListViewDebug, $iIndex) ; Scroll into view EndIf EndIf Sleep(10) ; Helps to keep CPU load low WEnd Func StartCapture() If Not $bCapturing Then StartDebugCapture() Switch @error Case 0 $bCapturing = True GUICtrlSetState($ButtonStart, $GUI_DISABLE) GUICtrlSetState($ButtonStop, $GUI_ENABLE) Case 1 MsgBox(16, @ScriptName, "Error loading DebugCapture.dll", 0, $MainForm) Case 2 MsgBox(16, @ScriptName, "Initialization failed.", 0, $MainForm) Case 3 MsgBox(64, @ScriptName, "Another debugger is already active.", 0, $MainForm) EndSwitch EndIf EndFunc Func StopCapture() If $bCapturing Then StopDebugCapture() $bCapturing = False GUICtrlSetState($ButtonStart, $GUI_ENABLE) GUICtrlSetState($ButtonStop, $GUI_DISABLE) EndIf EndFunc Give it a try Nine, may help.
    1 point
  5. Wow, kicking myself for not thinking of this, so simple yet so genius. I'll test now.
    1 point
  6. Nine

    Windows Debug Messages?

    I got it working (I think). Tested, both x86 and x64, it gives same results. I haven't put any error handling, as I wanted to see if it would work solely in AutoIt. #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <StructureConstants.au3> #include <WinAPIProc.au3> #include <Array.au3> #include <WinAPIFiles.au3> #include <APIErrorsConstants.au3> Global Const $SECURITY_DESCRIPTOR_REVISION = 1 Global $hEventBufferReady, $hEventDataReady, $hBuffer, $pDebugInfo, $bEnd HotKeySet("{ESC}", Terminate) Example() Func Example() Local $iPID, $sOutput StartDebugCapture() Do $sOutput = GetDebugOutput() If $sOutput Then $iPID = @extended ConsoleWrite($iPID & @CRLF & $sOutput & @CRLF) EndIf Sleep(100) Until $bEnd StopDebugCapture() EndFunc ;==>Example Func StartDebugCapture() Local $tSecurityDescriptor = DllStructCreate("byte;byte;word;ptr[4]") Local $tSecurityAttributes = DllStructCreate($tagSECURITY_ATTRIBUTES) $tSecurityAttributes.Length = DllStructGetSize($tSecurityAttributes) $tSecurityAttributes.Descriptor = DllStructGetPtr($tSecurityDescriptor) $tSecurityAttributes.InheritHandle = True Local $aCall = DllCall("advapi32.dll", "bool", "InitializeSecurityDescriptor", "struct*", $tSecurityDescriptor, "dword", $SECURITY_DESCRIPTOR_REVISION) $aCall = DllCall("advapi32.dll", "bool", "SetSecurityDescriptorDacl", "struct*", $tSecurityDescriptor, "bool", True, "ptr", 0, "bool", False) $hEventBufferReady = _WinAPI_CreateEvent($tSecurityAttributes, False, False, "DBWIN_BUFFER_READY") ;ConsoleWrite($hEventBufferReady & @CRLF) $hEventDataReady = _WinAPI_CreateEvent($tSecurityAttributes, False, False, "DBWIN_DATA_READY") ;ConsoleWrite($hEventDataReady & @CRLF) $hBuffer = _WinAPI_CreateFileMapping(-1, 4096, "DBWIN_BUFFER", $PAGE_READWRITE, $tSecurityAttributes) ;ConsoleWrite($hBuffer & @CRLF) $pDebugInfo = _WinAPI_MapViewOfFile($hBuffer, 0, 4096, $FILE_MAP_READ) ;ConsoleWrite($pDebugInfo & @CRLF) _WinAPI_SetEvent($hEventBufferReady) EndFunc ;==>StartDebugCapture Func StopDebugCapture() _WinAPI_CloseHandle($hEventBufferReady) _WinAPI_CloseHandle($hEventDataReady) _WinAPI_UnmapViewOfFile($pDebugInfo) _WinAPI_CloseHandle($hBuffer) EndFunc ;==>StopDebugCapture Func GetDebugOutput() If _WinAPI_WaitForSingleObject($hEventDataReady, 0) = $WAIT_TIMEOUT Then Return Local $tEvent = DllStructCreate("dword PID;char string[4092]", $pDebugInfo) _WinAPI_SetEvent($hEventBufferReady) Return SetExtended($tEvent.PID, $tEvent.string) EndFunc ;==>GetDebugOutput Func Terminate() $bEnd = True EndFunc ;==>Terminate
    1 point
  7. Hmm, maybe check again if the result is 0000, if it returns 0000 again it must be correct, otherwise it will return the new correct result. Local $BigString = "" For $loop = 0 To 999999 ControlClick($tool, "", "TTabSheet1", "primary", 1, 100, 100) _WinAPI_BitBlt($hCDC, 0, 0, 88, 32, $hDDC, $posx, $posy, 0x00CC0020) $result = GetNumber($result) If $result = "0000" Then _WinAPI_BitBlt($hCDC, 0, 0, 88, 32, $hDDC, $posx, $posy, 0x00CC0020) $result = GetNumber($result) EndIf $BigString &= String(StringFormat('%06i', $loop)) & "," & String($result) & @LF Next _WinAPI_DeleteDC($hCDC) FileWrite($db, $BigString) It's not failproof, but you said the errors never (so far) occur the same place, so should be ok, else make it a triple check. But as you also mentioned, it could be hardware related, imagine the script being so fast that it runs faster than a 60hz monitor, then you would need a faster monitor. Or even a ram problem, that a computer with ECC ram would handle it better.
    1 point
  8. I'm using that exact version of the installer and confirmed that mentioned version of the wrapper and I just wanted to mention that it is still adding duplicates, at least under some circumstances. Most includes end up with two. But with #include <WinAPIInternals.au3> I end up with 3. I'll have a look as I can replicate it.
    1 point
  9. I'm using that exact version of the installer and confirmed that mentioned version of the wrapper and I just wanted to mention that it is still adding duplicates, at least under some circumstances. Most includes end up with two. But with #include <WinAPIInternals.au3> I end up with 3. For all the doubles, I already had those includes in my file. So it added a second one. Same with #include <WinAPIInternals.au3> I had as well, but in that case it added 2 more so I ended up with 3. Thank you for your efforts regarding this. I feel like it is quite valuable now with this transition to VSCode.
    1 point
  10. The interesting thing about this is that we can switch back and forth between these two extensions (if both are installed) by simply switching between "AutoIt3" and "AutoIt" on this same status bar menu. So for example, you can be using @genius257 extension "AutoIt3" for coding in general, then switch to "AutoIt" briefly to run a Ctrl+F7 to compile a binary and other options that need integration to Au3Wrapper and such. Then simply switch back to "AutoIt3.
    1 point
  11. Yes so I found out. I've looked for an alternative DLL with similar capabilities, and x64. Have not found anything, yet. I know less than nothing when it comes to C++! Gimme a few years and I see what I can do 🤔 If I find anything, like a compiled x64 DLL, I'll post it here!
    1 point
  12. Hello everyone! Apparently, the last time I've been here was 13 years ago! How time flies... What made me come back is the Microsoft's stupid decision to remove the QuickLaunch from Windows 11. On all the previous versions I used to have a QuickLaunch toolbar on my taskbar and had all the shortcuts for my different projects neatly arranged in sub-folders. After this feature was removed, I tried the ExplorerPatcher but at some point it started getting flagged by the Defender. And it added a lot more things that were not necessary for me. I only needed the QuickLaunch. So after a lot of frustration i decided to make my own and remembered the dear old AutoIt! The script below uses an INI file with the same name to get which folder you want to use as a QuickLaunch and creates a 5px by 5px simple GUI at the top left corner of the screen, which sits on top of the other windows. The GUI has a menu with sub-menus and items corresponding to the sub-folders and the .lnk files in the QuickLaunch folder. It tracks the position of the mouse and when it gets to the top-left corner it clicks on the GUI to display the menu. Since it loads the folder only once at the start, there is a CRTL+ALT+R hotkey combination to quickly restart the app and reload the shortcuts if you have made any changes. CTRL+ALT+X is for exiting the app. When compiled, the executable is a little over 1MB and uses about 8-9MB of RAM I'm sharing it here hoping it would be as useful to you as it is to me. Best wishes for the new 2025 from Bulgaria! Edit: Forgot to mention it uses the ModernMenu UDF by Holger Kotsch QuickLaunch.ico QuickLaunch.ini QuickLaunch.au3 ModernMenuRaw.au3
    1 point
  13. mr-es335

    Data-To-Arrays

    Good Day, User, "Water", was kindly assisting me trying to get a "handle" on arrays, and though the information was 'interesting", I am still at al total loss to really-and-truly understand arrays. • My only "issue" here is that Excel focuses on [Column-then-row, A1], rather than [Row-then-column, 1A]. Take, for example, the following: In the above example, there are three parts, with each part...other that the physical data, being identical to each other. How would the above be best incorporated into an array?
    1 point
  14. ioa747

    Data-To-Arrays

    3D array ; 3D array [table][row][column] Local $aProducts[3][4][4] = [ _ [ _ ["HKEY_CURRENT_USER\Software\FabFilter\Pro-MB\1.0", "showInteractiveHelp", "REG_DWORD", "00000000"], _ ["HKEY_CURRENT_USER\Software\FabFilter\Pro-MB\1.0", "showWelcomeHint", "REG_DWORD", "00000000"], _ ["HKEY_CURRENT_USER\Software\FabFilter\Pro-MB\1.0", "LicenseText", "REG_DWORD", "00000000"], _ ["HKEY_CURRENT_USER\Software\FabFilter\Pro-MB\1.0", "Product", "REG_DWORD", "00000000"] _ ], [ _ ["HKEY_CURRENT_USER\Software\FabFilter\Pro-Q\3.0", "showInteractiveHelp", "REG_DWORD", "00000000"], _ ["HKEY_CURRENT_USER\Software\FabFilter\Pro-Q\3.0", "showWelcomeHint", "REG_DWORD", "00000000"], _ ["HKEY_CURRENT_USER\Software\FabFilter\Pro-Q\3.0", "LicenseText", "REG_DWORD", "00000000"], _ ["HKEY_CURRENT_USER\Software\FabFilter\Pro-Q\3.0", "Product", "REG_DWORD", "00000000"] _ ], [ _ ["HKEY_CURRENT_USER\Software\FabFilter\Pro-R\2.0", "showInteractiveHelp", "REG_DWORD", "00000000"], _ ["HKEY_CURRENT_USER\Software\FabFilter\Pro-R\2.0", "showWelcomeHint", "REG_DWORD", "00000000"], _ ["HKEY_CURRENT_USER\Software\FabFilter\Pro-R\2.0", "LicenseText", "REG_DWORD", "00000000"], _ ["HKEY_CURRENT_USER\Software\FabFilter\Pro-R\2.0", "Product", "REG_DWORD", "00000000"] _ ]] For $t = 0 To UBound($aProducts) - 1 ;table ConsoleWrite("Part" & $t & @CRLF) For $r = 0 To UBound($aProducts, 2) - 1 ;row For $c = 0 To UBound($aProducts, 3) - 1 ;column ConsoleWrite($aProducts[$t][$r][$c] & " - ") Next ConsoleWrite(@CRLF) Next Next
    1 point
  15. Something like this: #include <date.au3> Global $sTime1 = "13:43:24", $sTime2 = "13:44:35" Global $iTime1, $iTime2 Global $aTemp, $sHour, $sMinute, $sSecond $aTemp = StringSplit($sTime1, ":") $iTime1 = _TimeToTicks($aTemp[1], $aTemp[2], $aTemp[3]) $aTemp = StringSplit($sTime2, ":") $iTime2 = _TimeToTicks($aTemp[1], $aTemp[2], $aTemp[3]) _TicksToTime($iTime2-$iTime1, $sHour, $sMinute, $sSecond) ConsoleWrite($sHour & ":" & $sMinute & ":" & $sSecond & @LF)
    1 point
  16. I purposely made my GUI as small as possible, and every inch of the space in the GUI is too dear to spare. That's why I came up with an idea to make use of the empty space in the title bar. That brought an added bonus: I could give a color to the title bar. I will upload the latest version of zPlayer with these features when they are fine-tuned. Edit: Version 6.1.5.0 with these features was uploaded on Feb. 16, 2025.
    0 points
×
×
  • Create New...