Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/29/2023 in all areas

  1. TheDcoder

    Kobo Cover Fixer

    Let's not forget about https://wormhole.app for easy file sharing needs, it supports files up to 10 GB.
    1 point
  2. In case you ever want to customize these functions (maybe modifying to start from 1 as minimum, not from 0) here is the code for assembly functions. [Fill struct] mov esi, [esp + 4] mov ecx, [esp + 8] next: mov dword[esi], 0FFFFFFFFh add esi, 4 loop next ret 8 [Find minimum] mov esi, [esp + 4] mov ecx, [esp + 8] xor edx, edx next: lodsd cmp eax, edx je increase loop next jmp exit increase: mov esi, [esp + 4] mov ecx, [esp + 8] inc edx jmp next exit: mov eax, edx ret 8 [Write minimum] mov esi, [esp + 4] mov ecx, [esp + 8] mov edx, [esp + 0Ch] next: lodsd cmp eax, 0FFFFFFFFh je update loop next mov eax, 0FFFFFFFFh jmp exit update: mov dword[esi-4], edx mov eax, 0 exit: ret 12
    1 point
  3. If you prefer using a hook then I would recommend using _WinAPI_RegisterShellHookWindow as it is more appropriate when a window closes. Here an example : #include <APISysConstants.au3> #include <WinAPISysWin.au3> #include <Constants.au3> If WinExists("[CLASS:Notepad]") Then Exit MsgBox($MB_SYSTEMMODAL, "Error", "Close all instance of Notepad") Run("Notepad") Global $hTarget = WinWait("[CLASS:Notepad]") OnAutoItExitRegister(OnAutoItExit) Global $hForm = GUICreate('') GUIRegisterMsg(_WinAPI_RegisterWindowMessage('SHELLHOOK'), WM_SHELLHOOK) _WinAPI_RegisterShellHookWindow($hForm) While 1 Sleep(100) WEnd Func WM_SHELLHOOK($hWnd, $iMsg, $wParam, $lParam) If $lParam <> $hTarget Then Return Switch $wParam Case $HSHELL_WINDOWDESTROYED ConsoleWrite("Notepad has been closed" & @CRLF) Exit EndSwitch EndFunc ;==>WM_SHELLHOOK Func OnAutoItExit() _WinAPI_DeregisterShellHookWindow($hForm) EndFunc ;==>OnAutoItExit The script will stop when you close Notepad...
    1 point
×
×
  • Create New...