Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/28/2021 in all areas

  1. Here's an easy explainer of the difference between static (.lib) and dynamic (.dll) libraries. Basically, a static lib is permanently incorporated into the executable, and cannot be changed independently (except when recompiling the library itself, and then recompiling the exe with the new lib), whereas a dll is stand-alone and can be accessed (NB with the correct calling convention, which determines stack-order of the function arguments parsed) by any programme that opens the dll and calls its externally-available functions with appropriate parameters. An exe with static lib does not need/use the dll. The advantage of dlls is portable, independently-upgradeable code accessible from multiple languages. In order to get your dll working you need to know for each function used which parameters to parse, of which type, and in what order. You also need to know the return type of any result parsed back to the calling program (to interpret it correctly). some functions return a result directly, but others expect a memory address of a buffer where the function is to write its output. Key is to obtain the dll documentation on this. Of course, if you have the library's source code, you can just look this up directly. Re. your last question: correct. If you can't even open your dll for access then something else is wrong (@error code??), maybe you're mixing 32/64-bit? if the dll is x64, ensure the AutoIt interpreter is running as an x64 process too (default is 32-bit).
    1 point
  2. What's New in Version 0.2021.02.28 fixed: GUI styles constants by @pixelsearch. compiled script on 3.3.15.3-beta Files download are in the files section.
    1 point
  3. sommahe, Welcome to the AutoIt forums. You are using: GUISetOnEvent(-1, "_Close_main") But for controls you need GUICtrlSetOnEvent. M23
    1 point
  4. From me as well : "Thanks for sharing" That is true, but it makes a big difference whether the nut is made of gold or is rotten. Moreover, finding something is only the first step. There must also be someone willing to spend his time to prepare something delicious from it (as you did) .
    1 point
  5. Thanks for you kind words. I didn't do much but to stumble accross this (Even a blind squirrel finds a nut once in a while ) but I am glad you like it! All credits go to @genius257 for AutoItObject_Internal and of course to the original AutoItObject-Team for their great effort.
    1 point
  6. -or- ; Retrieve the handle of the Notepad window using the classname of Notepad. Local $hWnd = WinGetHandle("[ACTIVE]") ; Retrieve the identifier of the thread and pass a variable to the $iPID parameter to store the PID. Local $iPID = 0 Local $iThread = _WinAPI_GetWindowThreadProcessId($hWnd, $iPID) ; Display the process thread, PIDof, processname and processfilename ConsoleWrite(' Process thread:' & $iThread & ' Process ID (PID): ' & $iPID & " Processname:" & _WinAPI_GetProcessName($iPID) & " filename:" & _WinAPI_GetProcessFileName($iPID) & @CRLF) Jos
    1 point
  7. So, I've been working on this for the last three days, and I've come to the conclusion that this library is incapable of overwriting a snapshot that has been used (Using either FFduplicate or simply calling FFsnapshot again.) Running v2.2, this simple code will crash the SciTE compiler every single time. #include "FastFind.au3" #RequireAdmin FFSetDebugMode(0) ConsoleWrite(@CRLF & 'Starting program') FFSetDefaultSnapShot(1) FFSnapShot() Sleep(2000) FFSetDefaultSnapShot(2) FFSnapShot() If FFIsDifferent(1,2) Then ConsoleWrite(@CRLF & 'Yup, they"re different.' & @CRLF) Else ConsoleWrite(@CRLF & 'Nope, they"re the same.' & @CRLF) EndIf FFSnapShot();This line will cause the program to crash. ;FFDuplicateSnapShot(1,2); This line would ALSO cause the program to crash. ConsoleWrite(@CRLF & 'Finished replacing Snapshot 2') ConsoleWrite(@CRLF & 'The green land of happiness that is forever out of reach..') Perhaps the FF library is incompatible with Windows 10? If so, does anyone have any alternative recommendations that can duplicate the functionality of FFLocalizeChanges (That is, a UDF that can find the pixel coordinates of the differences between two pixelchecksums or screenshots)? Edit: This code appears to work fine on v2.1, but not v2.2. To all future readers, avoid v2.2!
    1 point
  8. Why not _WinAPI_GetProcessFileName ? (coming with #include <WinAPIProc.au3>)
    1 point
  9. For the 1st : _WinAPI_GetProcessName ( WinGetProcess("[Active]") ) For the 2nd, I don't know if there is a WinAPI fonction to retrieve a list....
    1 point
×
×
  • Create New...