Jump to content

argumentum

MVPs
  • Posts

    5,573
  • Joined

  • Last visited

  • Days Won

    185

argumentum last won the day on January 25

argumentum had the most liked content!

About argumentum

Profile Information

  • Member Title
    ✨Universalist ✨
  • Location
    I'm in your browser now =)
  • WWW
    https://www.youtube.com/watch?v=SjwX-zMRxO0&t=5s
  • Interests
    Relax

Recent Profile Visitors

14,313 profile views

argumentum's Achievements

  1. Can you open SciTE and edit scripts with it ?
  2. oh, ok. Note to self: pay attention Update the https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#latest-supported-redistributable-version files. Do both, x64 and x86 😅
  3. The hardware is not relevant. How windows uploads and treats everything as a threat is. I only use wetware for viruses. No software, but that's me 🙃 Maybe it'll get faster with time. Else add excludes. Else, welcome to the future
  4. The doc says "By default, the entire window is copied." So if you set 0, PW_CLIENTONLY is not set and PrintWindow calls GetWindowRect instead of GetClientRect PW_WINDOW = 0x0. ( uses GetWindowRect ) PW_CLIENTONLY = 0x1 ( uses GetClientRect ) PW_RENDERFULLCONTENT = 0x2 ( uses Windows.Graphics.Capture API ) ( am working.. at work, so I can't give it more attention right now )
  5. what I meant by "Local Const $PW_RENDERFULLCONTENT = 0x2 ; this will go to where it should 😃" is that we need to add $PW_RENDERFULLCONTENT, PW_CLIENTONLY and PW_CLIENTGoFigure to the constants script. PW_CLIENTONLY used to be true/false. After Win8.1 PW_RENDERFULLCONTENT came along, and are now BitOR values. Given that is not documented, declaring PW_CLIENTONLY = 1 but we ( at least myself ) don't have a const. name for ZERO. PW_RENDERFULLCONTENT + PW_CLIENTONLY = 3, and works as such. We ( well, you @mLipok ) have to come with proper naming. Good luck Jim If you don't find a name, I'll look around and invent a proper sounding one
  6. ...always disliked with a passion those inline examples with "Local" where "Global" goes. Encapsulating all that in an Example() is the way it should be. Looks good, thanks.
  7. 0x1 PW_CLIENTONLY Captures only the client area. 0x2 PW_RENDERFULLCONTENT Used to capture the full content, which is useful for modern applications. ...After some digging I found the following in the chromium source: "The PW_RENDERFULLCONTENT flag is undocumented, but works starting in Windows 8.1. It allows for capturing the contents of the window that are drawn using DirectComposition." UINT flags = PW_CLIENTONLY | PW_RENDERFULLCONTENT; ... maybe that's enough info for the help file ? Edit: updated the example I proposed. ...some extra info via AI
  8. ok, lets replace the example with this: #include <GUIConstantsEx.au3> #include <SendMessage.au3> #include <StaticConstants.au3> #include <WinAPIGdi.au3> #include <WinAPIGdiDC.au3> #include <WinAPIHObj.au3> #include <WindowsConstants.au3> ShellExecute(@SystemDir & '\calc.exe') Local $hWnd = WinWaitActive("[REGEXPCLASS:CalcFrame|ApplicationFrameWindow]", '', 3) If Not $hWnd Then Exit EndIf Sleep(300) ; give it time to draw ; Create GUI Local $iSize = WinGetPos($hWnd) Local $hForm = GUICreate('Test ' & StringReplace(@ScriptName, '.au3', '()'), $iSize[2] + 80, $iSize[3] + 80) Local $idPic = GUICtrlCreatePic('', 40, 40, $iSize[2], $iSize[3]) Local $hPic = GUICtrlGetHandle($idPic) ; Create bitmap Local $hDC = _WinAPI_GetDC($hPic) Local $hDestDC = _WinAPI_CreateCompatibleDC($hDC) Local $hBitmap = _WinAPI_CreateCompatibleBitmap($hDC, $iSize[2], $iSize[3]) Local $hDestSv = _WinAPI_SelectObject($hDestDC, $hBitmap) Local $hSrcDC = _WinAPI_CreateCompatibleDC($hDC) Local $hBmp = _WinAPI_CreateCompatibleBitmap($hDC, $iSize[2], $iSize[3]) Local $hSrcSv = _WinAPI_SelectObject($hSrcDC, $hBmp) Local Const $PW_RENDERFULLCONTENT = 0x2 ; this will go to where it should =) _WinAPI_PrintWindow($hWnd, $hSrcDC, $PW_RENDERFULLCONTENT) _WinAPI_BitBlt($hDestDC, 0, 0, $iSize[2], $iSize[3], $hSrcDC, 0, 0, $MERGECOPY) _WinAPI_ReleaseDC($hPic, $hDC) _WinAPI_SelectObject($hDestDC, $hDestSv) _WinAPI_SelectObject($hSrcDC, $hSrcSv) _WinAPI_DeleteDC($hDestDC) _WinAPI_DeleteDC($hSrcDC) _WinAPI_DeleteObject($hBmp) ; Set bitmap to control _SendMessage($hPic, $STM_SETIMAGE, 0, $hBitmap) Local $hObj = _SendMessage($hPic, $STM_GETIMAGE) If $hObj <> $hBitmap Then _WinAPI_DeleteObject($hBitmap) EndIf GUISetState(@SW_SHOW) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE WinClose($hWnd, "") and @Nine, can you find a reference to that "2" flag to document it ? Or the info that should go there if there is no reference to be found ?
  9. ...digging deeper. https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-printwindow Local $aCall = DllCall('user32.dll', 'bool', 'PrintWindow', 'hwnd', $hWnd, 'handle', $hDC, 'uint', $bClient) PrintWindow often fails on modern UWP (Universal Windows Platform) apps like the Windows Calculator because they use hardware acceleration (DirectComposition) instead of standard GDI rendering. PrintWindow only captures the visible GDI content, not the accelerated content. To capture it, you must use Desktop Duplication APIs or ensure the window is not minimized or obscured, though these may still fail on UWP apps So, we'll need to either come up with another example or a disclaimer of the technologies involved 🤷‍♂️ Edit: _ScreenCapture_CaptureWnd() works well with the newer calculator.
  10. _WinAPI_PrintWindow() Works well with the old "CLASS:CalcFrame" but not with the newer "CLASS:ApplicationFrameWindow" It would work better with: Local $hWnd = WinWaitActive("[REGEXPCLASS:CalcFrame|ApplicationFrameWindow]", '', 3) and WinClose($hWnd, "") at the end If the newer calculator has a "don't screen record me" setting ( and that would make sense ) it would fail to screen capture it. _ScreenCapture_Capture() does capture it so, that's no it. ..well, that as my investigating
  11. True. I did and yes, it was good
  12. First thing that came to my mind was to read up to X position, split and work on that, then read the next until done 🤷‍♂️ Line by line would be kind of slow I think
  13. I have a CSV file. Is 3.12 GB (3,357,068,152 bytes). FileReadToArray() loaded ( just the count ) and UBound() say that is 20073124 and that just happens to be a tiny bit more that the max of 16 million elements an array can hold. How can a file that size be read, chop in @CRLF chunks, filtered ( If Not StringInStr($aFile[$n], ".au3") Then ContinueLoop ) and write to another file the resultant ? Anything goes: SQLite, memory, etc. . Thanks
×
×
  • Create New...