Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/17/2020 in all areas

  1. Some runnable code makes things a lot easier. Note that the $LVN_GETDISPINFOW notifications comes directly from the Windows operating system and that the $tagNMLVDISPINFO structures that you fill out as a response to these notifications are used by the operating system to display the text in the listview cells. This means that the $tText buffer must be valid until the operating system is completely finished using the buffer. It's not enough that the buffer is only valid in the WM_NOTIFY function. It must also be valid while the operating system uses the $tagNMLVDISPINFO structure and thus the buffer. Therefore, the buffer must be global or local static. It's not enough that it's just a local variable in the WM_NOTIFY function. In fact, it doesn't seem necessary to fill in the "TextMax" field. So the code can be optimized a bit. Note that in a listview cell, as far as I remember, there is a limitation on the length of the texts of a few thousand characters.
    1 point
  2. Those aren't really Autoit events. They are actually events that you are triggering in the web browser. You will find lots of info by Googling the word HTMLEvents
    1 point
  3. Don't use WM_SETREDRAW messages in a virtual listview. WM_SETREDRAW messages are used in a standard listview to maintain listview storage e.g. to insert a large number of rows into the listview. In a virtual listview, there is no storage and therefore there is no need to use WM_SETREDRAW messages. The best way to update a virtual listview each time a new row is added is GUICtrlSendMsg( $gListview, $LVM_SETITEMCOUNT, $iRows, 0 ) ; Note $iRows GUICtrlSendMsg( $gListview, $LVM_ENSUREVISIBLE, $iRows-1, 0 ) ; Note $iRows-1
    1 point
  4. MimiOne

    ToDo Finder

    Very nice. Thank you !! M.C. From France
    1 point
  5. My god I was surprised when I found this function, it's frickin' awesome. It allows you to sleep down to 100 nanoseconds! UDF: ; #FUNCTION#;=============================================================================== ; ; Name...........: _HighPrecisionSleep() ; Description ...: Sleeps down to 0.1 microseconds ; Syntax.........: _HighPrecisionSleep( $iMicroSeconds, $hDll=False) ; Parameters ....: $iMicroSeconds - Amount of microseconds to sleep ; $hDll - Can be supplied so the UDF doesn't have to re-open the dll all the time. ; Return values .: None ; Author ........: Andreas Karlsson (monoceres) ; Modified.......: ; Remarks .......: Even though this has high precision you need to take into consideration that it will take some time for autoit to call the function. ; Related .......: ; Link ..........; ; Example .......; No ; ;;========================================================================================== Func _HighPrecisionSleep($iMicroSeconds,$hDll=False) Local $hStruct, $bLoaded If Not $hDll Then $hDll=DllOpen("ntdll.dll") $bLoaded=True EndIf $hStruct=DllStructCreate("int64 time;") DllStructSetData($hStruct,"time",-1*($iMicroSeconds*10)) DllCall($hDll,"dword","ZwDelayExecution","int",0,"ptr",DllStructGetPtr($hStruct)) If $bLoaded Then DllClose($hDll) EndFunc No msdn link for this one, since there is none Note: Even though it supports down to 100 ns sleep don't count on that for being correct in practise because autoit will take some time to call the function (and all the other sutff that are in the UDF). For example on my machine, it took autoit 260 microseconds to call the function.
    1 point
×
×
  • Create New...