Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/14/2025 in all areas

  1. It checks for the environment variables "SCITE_USERHOME" and then "SCITE_HOME" and when they are not defined assumes a portable version is used so will default to the directory the AU3STRIPPER program is located in.
    2 points
  2. MattyD

    WinRT - WinUI3

    Hi guys, apologies in advance for the wall of text! Just an update as to where things are ATM - I've have gone on a tangent re: resolving IIDs for paramatised interfaces. This is more of a core WinRT thing - but I thought I'd take whoever is interested along on the ride... So I attempted to create a grid (Microsoft.UI.Xaml.Controls.Grid) which should theoretically allows us drop other controls within it. Basically its a layout thing to divide up the window. Want an "OK" button down the bottom right? Just nest the button in the cell that is down there!. Creating a grid, then extracting the row and column definitions is easy enough. #include "Include\Classes\Microsoft.UI.Xaml.Controls.Grid.au3" ;-- Setup window etc. -- Local $pGrid_Fact = _WinRT_GetActivationFactory("Microsoft.UI.Xaml.Controls.Grid", $sIID_IGridFactory) Local $pGrid = IGridFactory_CreateInstance($pGrid_Fact, 0, $pInner) Local $pColDefs = IGrid_GetColumnDefinitions($pGrid) Local $pRowDefs = IGrid_GetRowDefinitions($pGrid) Looking at $pColDefs, we can determine its a "Microsoft.UI.Xaml.Controls.ColumnDefinitionCollection". We know this by inspecting Microsoft.UI.Xaml.Controls.Grid in the class explorer. Otherwise _WinRT_DisplayInterfaces($pColDefs ) or _WinRT_DisplayClass($pColDefs ) will get you to the same place. Method : get_ColumnDefinitions Fn : value = get_ColumnDefinitions() P0 : value type: Microsoft.UI.Xaml.Controls.ColumnDefinitionCollection After digging in the metadata we can resolve some IIDs of $pColDefs, but at best _WinRT_DisplayInterfaces() only gives us: Class: Microsoft.UI.Xaml.Controls.ColumnDefinitionCollection {CDFBA81A-54FA-557D-A712-21640F16C534} {749BC47C-1743-5C21-9CED-C8A1134C7BA7} {80741C8F-A401-5C63-B6C4-15D165E541C7} {E7BEAEE7-160E-50F7-8789-D63463F979FA} - IDependencyObject {EB24C20B-9816-4AC7-8CFF-36F67A118F4E} {00000038-0000-0000-C000-000000000046} - IWeakReferenceSource {DF0B3D60-548F-101B-8E65-08002B2BD119} - ISupportErrorInfo {00000000-0000-0000-C000-000000000046} - IUnknown {AF86E2E0-B12D-4C6A-9C5A-D7AA65101E90} - IInspectable But what we're looking for is these collection interfaces. TypeDef : Microsoft.UI.Xaml.Controls.ColumnDefinitionCollection Extends : System.Object Interface : Windows.Foundation.Collections.IVector`1<Microsoft.UI.Xaml.Controls.ColumnDefinition> Interface : Windows.Foundation.Collections.IIterable`1<Microsoft.UI.Xaml.Controls.ColumnDefinition> The class explorer tells us IVector should be there. Windows.Foundation.Collections.IVector`1 has a GUID defined as "{913337E9-11A1-4345-A3A2-4E7F956E222D}". so what gives? It does not appear in our list because the IVector`1 GUID is NOT an IID, it is something else called a PIID. It needs to be combined with the datatype in order to give us the IID for Windows.Foundation.Collections.IVector`1<Microsoft.UI.Xaml.Controls.ColumnDefinition>. We can probably just assume the top GUID maps to this... but we really need a way to resolve it properly. The IIDs for paramatiesed interfaces are calculated at runtime so we can't just dig in the metadata for them. Enter RoGetParameterizedTypeInstanceIID. This is the can of worms that I'm still trying to nail down - so stay tuned for part 2! Once all that is sorted I'll also need to fix the WinRT Library generator. At the moment methods involving arrays don't generate correctly, which is kinda important when dealing with collections!!!
    2 points
  3. orbs

    math puzzle

    thank you @Musashi. that was indeed the case. i removed a few old screenshots from old forum posts. now i have ~4MB free... will use them for a good cause 🙂 @argumentum thank you for the reminder, i missed to upload the icon... update in first post. also, can i safely presume you do not have MS-Office installed? your screenshot shows an unexpected character for "New Puzzle" (2nd blue from the top, compare to my screenshot on the first post). this is because it uses the "Wingdings 3" font. the other characters use the "Webdings" or "Wingdings" fonts, shipped with Windows; however "Wingdings 2" and "Wingdings 3" fonts are shipped with other MS products, notably Office. you obviously do not have that font installed; hence i conclude i need to be more meticulous in my choice of fonts... and... that hell of a mess occasionally referred to as "DPI" came over for a visit. i scripted the app in a 150% DPI, just tested it on 100% and 125%, the results are horid. so i'll need to delve into that one as well...
    1 point
  4. ..no, it wouldn't. I see why. Then maybe add it to the beta folder for download ?
    1 point
  5. ...so, what's in Au3Stripper.dat you asked @WildByDesign, ok, Functionname,Parameter to check,0=check for function/1=check for Variable adlibenable,1,0 adlibregister,1,0 adlibunregister,1,0 call,1,0 dllcallbackregister,1,0 eval,1,1 guictrlregisterlistviewsort,2,0 guictrlsetonevent,2,0 guiregistermsg,2,0 guisetonevent,2,0 hotkeyset,2,0 isdeclared,1,1 objevent,2,0 onautoitexitregister,1,0 onautoitexitunregister,1,0 opt,2,0 traysetonevent,2,0 trayitemsetonevent,2,0 @Jos, that file, as far as I remember, is never touched/edited by users. Therefore it always uses the default values. Would it be a good idea to ignore it's absence if not found given that anyways a user has no idea of the benefit of changing it ( if there is any ) ? We only use it for AutoIt. ( tho for what I see, it could be use for other coding languages too, hence the file to get the values from )
    1 point
  6. I have been using v5 beta for many months now and have had zero issues on my machine. Thank you for everything, by the way. So I decided to update my GitHub Actions workflow from the old SciTE4AutoIt3 to the latest SciTE4AutoIt3_vsc build that I use on my machine. The workflow uses the /S silent switch to install it. The problem is with the following: - ### C:\Program Files (x86)\AutoIt3\SciTE\Au3Stripper\Au3Stripper.dat missing... Please get it from the website to make sure the Au3Stripper will work correctly. I don't understand why Au3Stripper would specifically be looking for the Au3Stripper.dat file within C:\Program Files (x86)\ when it really should be looking in LocalAppData. But I also don't understand why the old SciTE4AutoIt3 did not have this issue. Is there anywhere that I can tell Au3Stripper where to look for this file? If it's available to download somewhere as a standalone file, I could download/copy the file to wherever it is looking for it.
    1 point
  7. It was semi-manually, since i also needed to add parameter types and return types. 😅 semi, because i used my inline suggestions from my windsurf AI vscode extension to speed things up. That might be why the text is wrong at some places Edit: I've updated the summary for the two functions mentioned. It will be available with next version 😉
    1 point
  8. 1 point
  9. I encountered the speed of using _ArrayBinarySearch while working on a project of mine. I had previously been using _ArraySearch in the project to find duplicate items in 2 different arrays so that I could add the contents of the second array to the first one without having any duplicates. Unfortunately, the arrays I was searching had over 4000 rows in each, and using _ArraySearch to search through this took about 30-60 seconds on average on my older laptop. I had been using _ArraySearch because _ArrayBinarySearch only worked on 1D arrays and one of my arrays was 2D. My workaround for this was to create a temporary array that only contained the column of the 2D array I actually needed to search through, sorted it, and then used _ArrayBinarySearch to do my search for duplicates. This took the search time down to well under 1 second on average to go through the 2 arrays. So, you're probably wondering why I'm mentioning this. Well, the reason I had to go through the array gymnastics was because of the 1D array limitations of _ArrayBinarySearch. I figured that I would look at the function and see if I could tweak it to use search a sorted 2D array, and that's exactly what I've done. The function below has the same caveats as the original search function, the column that you're searching on MUST be sorted or you will end up with undefined results. It's actually very simple to use this function and it can be used in place of _ArrayBinarySearch because it will search both 1D and 2D arrays using the same code as the original function did, I just modified it to work with 2 dimensional arrays. Here's the code and a quickly thrown together example of how I used it to search 2 arrays for duplicate items. #include <Array.au3> Global $Array1[4000], $Array2[3999][2], $TLV_Array[4000], $Count = 0 For $I = 0 To 3999 For $X = 1 To 30 $Array1[$I] &= Chr(Random(65, 90, 1)) Next Next For $I = 0 To 3998 $Array2[$I][0] = $Array1[$I] $Array2[$I][1] = $I Next _ArraySort($Array2) _ArrayDisplay($Array2, "Sorted $Array2 by first column") $Timer = TimerInit() For $I = UBound($Array1) - 1 To 0 Step -1 Local $Read1 = $Array1[$I] Local $DelDup = _Array2D_BinarySearch($Array2, $Read1, 0) If $DelDup = -1 Then $TLV_Array[$Count] = $Array1[$I] $Count += 1 EndIf Next ReDim $TLV_Array[$Count] $Array1 = $TLV_Array ConsoleWrite("@@ (" & @ScriptLineNumber & ") : Time to check for duplicate files: " & Int(TimerDiff($Timer)) / 1000 & @CRLF) _ArrayDisplay($Array1, "$Array1 after deleting the duplicates") ; #FUNCTION# ==================================================================================================================== ; Name...........: _Array2D_BinarySearch ; Description ...: Uses the binary search algorithm to search through a 1 or 2-dimensional array. ; Syntax.........: _Array2D_BinarySearch(Const ByRef $avArray, $vValue[, $iColumn = 0[, $iStart = 0[, $iEnd = 0]]]) ; Parameters ....: $avArray - Array to search ; $vValue - Value to find ; $iColumn - [optional] Which column to search on [Default = First (0) column] ; $iStart - [optional] Index of array to start searching at [Default = start of array] ; $iEnd - [optional] Index of array to stop searching at [Default = end of array] ; Return values .: Success - Index that value was found at ; Failure - -1, sets @error to: ; |1 - $avArray is not an array ; |2 - $vValue outside of array's min/max values ; |3 - $vValue was not found in array ; |4 - $iStart is greater than $iEnd ; |5 - $iColumn is greater than actual number of columns ; |6 - $avArray has too many dimensions ; Author ........: Jos van der Zande <jdeb at autoitscript dot com> ; Modified.......: Ultima - added $iEnd as parameter, code cleanup ; Modified.......: BrewManNH - added ability to search a 2D array ; Remarks .......: When performing a binary search on an array of items, the contents of the column being searched MUST be ; sorted before the search is done, otherwise undefined results will be returned. ; Related .......: _ArrayFindAll, _ArraySearch, _ArrayBinarySearch ; Link ..........: ; Example .......: Yes ; =============================================================================================================================== Func _Array2D_BinarySearch(Const ByRef $avArray, $vValue, $iColumn = 0, $iStart = 0, $iEnd = 0) If UBound($avArray, 0) > 2 Then Return SetError(6, 0, -1) Local $i2D = False If UBound($avArray, 0) > 1 Then $i2D = True EndIf If UBound($avArray, 2) < $iColumn Then Return SetError(5, 0, -1) If Not IsArray($avArray) Then Return SetError(1, 0, -1) Local $iUBound = UBound($avArray) - 1 ; Bounds checking If $iEnd < 1 Or $iEnd > $iUBound Then $iEnd = $iUBound If $iStart < 0 Then $iStart = 0 If $iStart > $iEnd Then Return SetError(4, 0, -1) Local $iMid = Int(($iEnd + $iStart) / 2) If Not $i2D Then If $avArray[$iStart] > $vValue Or $avArray[$iEnd] < $vValue Then Return SetError(2, 0, -1) ; Search While $iStart <= $iMid And $vValue <> $avArray[$iMid] If $vValue < $avArray[$iMid] Then $iEnd = $iMid - 1 Else $iStart = $iMid + 1 EndIf $iMid = Int(($iEnd + $iStart) / 2) WEnd If $iStart > $iEnd Then Return SetError(3, 0, -1) ; Entry not found Return $iMid Else If $avArray[$iStart][$iColumn] > $vValue Or $avArray[$iEnd][$iColumn] < $vValue Then Return SetError(2, 0, -1) ; Search While $iStart <= $iMid And $vValue <> $avArray[$iMid][$iColumn] If $vValue < $avArray[$iMid][$iColumn] Then $iEnd = $iMid - 1 Else $iStart = $iMid + 1 EndIf $iMid = Int(($iEnd + $iStart) / 2) WEnd If $iStart > $iEnd Then Return SetError(3, 0, -1) ; Entry not found Return $iMid EndIf EndFunc ;==>_Array2D_BinarySearch
    1 point
×
×
  • Create New...