Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/22/2023 in all areas

  1. Agree, hence the changed default already in the full version and future SciTE lite versions
    2 points
  2. We use hash tables quite often in AutoIt. Be it the Scripting.Dictionary object or now the built-in AutoIt maps. But using something is still a difference to understanding how these data structures work internally. To make this more understandable for me I thought: What could be more obvious than implementing my own hash table in AutoIt? The result is this UDF. So if you want to understand for yourself how hash tables work exactly, you can have a close look at them in familiar AutoIt code. For productive purposes the UDF is of course rather not intended, because the alternatives Scripting.Dictionary and AutoIt-Maps offer more. Only from a very large number of elements (~ 1,000,000 elements) this UDF could be faster than the AutoIt maps. How to use the hash table?: example #1: #include "hashtable.au3" #include "Array.au3" Global $aTable = _hashtable_Create() _hashtable_Add($aTable, "banana", "the value of banana") _hashtable_Add($aTable, "apple", "the value of apple") _hashtable_Add($aTable, "apricot", "the value of apricot") _hashtable_Add($aTable, "orange", "the value of orange") ; remove element: _hashtable_Remove($aTable, "apple") ; get value with key: $value = _hashtable_Get($aTable, "apricot") MsgBox(0, "value for: apricot", $value) ; get the Keys as an array $aKeys = _hashtable_getKeys($aTable) _ArrayDisplay($aKeys, "The keys of the hash-table", "", 64) ; get the values as an array $aValues = _hashtable_getValues($aTable) _ArrayDisplay($aValues, "The values of the hash-table", "", 64) example #2: #include "hashtable.au3" #include "Array.au3" Global $aTable = _hashtable_Create() For $i = 1 To 10000 _hashtable_Add($aTable, "element " & Random(1, 1000, 1), "test-string " & $i) Next ; get the Keys as an array $aKeys = _hashtable_getKeys($aTable) ; get the values as an array $aValues = _hashtable_getValues($aTable) ; get all key-value pairs $aKeyValues = _hashtable_getKeyValues($aTable) _ArrayDisplay($aKeyValues) hashtable.au3
    1 point
  3. Then why do they go into the process of putting a filter and seeing if it produces more than one then calling it with the path and calling it directly
    1 point
  4. Ah.... you are right... that is indeed the default as it comes with the original source and I only changed it in the full version for now. I have changed it already last year in our repository but it's not updated yet in the latest production version I see.
    1 point
  5. AZJIO

    FindAllReferences

    Update Command line "TitlePart ClassWindow CurrentWord TestFlag" supported for 3rd party Scintilla editors. Now you can use the same executable for PureBasic, SciTE, Notepad++. In the description of the program, I added configuration files for SciTE and Notepad++ Added context menu with 5 items (Copy, Autohide, Next color, ini, Exit) Improved regular expressions, this increased the speed by almost 2 times. Calling the program again terminates the previous instance of the program. Bugfix: now precise positioning, expands collapsed code snippets.
    1 point
  6. please explain to me exactly what you want to put in your code
    1 point
  7. 1 point
  8. Of course If you think you found a way to go further I'm stuck
    1 point
  9. Yes, but why?
    1 point
  10. i try to make more simple
    1 point
  11. Zedna

    headless with AutoItX

    No because active is only foreground dialog with "Press Ctrl+Alt+Del to unlock ...". No other window can have active/focused status ...
    1 point
  12. Source: https://forum.dtw.tools/d/28-easycodeit-progress-flex-bison-parser/15
    1 point
  13. Another funny one StringRegExpReplace($sText1, '\H.*\H(*SKIP)(*F)|\h' ,"*")
    1 point
  14. Without using Execute StringRegExpReplace($sText1, '\G\h|\h(?=\h*$)' ,"*")
    1 point
×
×
  • Create New...