Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/05/2021 in all areas

  1. Hello. You probably could use a Rich Text Edit Box and load a .rtf file or you could embed IE too with some HTML nice About page. I did something with PictureBox+RichEdit time ago and this is the result. It's minimalist. Saludos
    2 points
  2. I think RichEdit has been my favorite thing I've ever discovered on AutoIt lol. In my quest to add in more html tags to my _StringToRichEditArray I needed a way to do href! There was an example I found that I followed but it didn't format correctly and didn't work 100% but it gave me a good base. Think I'll tackle inserting an image next, not looking forward to that. If anyone has an idea on how to do it let me know. Known issues (these will cause the hyperlink to lose the +li attribute after the RichEdit is updated): The hyperlink and friendly text are appended/inserted (directly adjacent to a non whitespace) but the hyperlink is not a valid hyperlink. Changing the char color for the control causes the hyperlink to lose it's hyperlink color (the light blue). Fix for Issue 1: Use the full URL for the hyperlink (https://www.autoitscript.com/site/ instead of www.autoitscript.com/site) Use any hyperlink with any friendly text that does not have www at the beginning (Hyperlink: www.google.com, Friendly Text: google.com) Use any hyperlink with any, or no, friendly text, but have a whitespace to the left of the hyperlink. Fix for Issue 2: I have no fix. Updated RichEdit Hyperlink.au3 Demo Original Post, outdated: Had a problem with inserting/appending hyperlinks that pointed to the local computer. (C:\Windows\)
    1 point
  3. Here is the virtual listview with sort indexes. You can choose from 10,000 - 100,000 rows in the combobox. There are two examples. In ArrayDisplay.au3, the sorting is performed on the fly when you click the column header. But the index is saved. The next time you click the same column header, the index doesn't need to be calculated again. In ArrayDisplay2.au3, sorting of all columns is performed in advance when you select a row number in the combobox. This is ArrayDisplay2.au3 on Windows 10: Time measurements in ArrayDisplay2.au3 on Windows 7 and Windows 10. Windows 7: $iRows = 10000 Generating array = 358.781013572459 Sorting array by column 0 Sorting array = 725.168987383328 Sorting array by column 1 Sorting array = 691.547153983459 Sorting array by column 2 Sorting array = 674.460721151355 Sorting array by column 3 Sorting array = 712.971753847876 Sorting array by column 4 Sorting array = 669.573738173515 $iRows = 20000 Generating array = 740.15795150085 Sorting array by column 0 Sorting array = 1573.40517161372 Sorting array by column 1 Sorting array = 1483.93515161976 Sorting array by column 2 Sorting array = 1450.29254023103 Sorting array by column 3 Sorting array = 1596.44574493107 Sorting array by column 4 Sorting array = 1457.82719306824 Displaying array $iRows = 30000 Generating array = 1112.6809728199 Sorting array by column 0 Sorting array = 2482.22581573692 Sorting array by column 1 Sorting array = 2342.03367751841 Sorting array by column 2 Sorting array = 2292.68983255434 Sorting array by column 3 Sorting array = 2564.00964209499 Sorting array by column 4 Sorting array = 2300.08984402379 Displaying array $iRows = 40000 Generating array = 1467.92280229134 Sorting array by column 0 Sorting array = 3421.94277520238 Sorting array by column 1 Sorting array = 3227.61289443203 Sorting array by column 2 Sorting array = 3173.90594884902 Sorting array by column 3 Sorting array = 3585.83262526565 Sorting array by column 4 Sorting array = 3179.76118610734 Displaying array $iRows = 50000 Generating array = 1850.58769848866 Sorting array by column 0 Sorting array = 4419.27792887224 Sorting array by column 1 Sorting array = 4162.76700754573 Sorting array by column 2 Sorting array = 4038.98393972278 Sorting array by column 3 Sorting array = 4644.78587451369 Sorting array by column 4 Sorting array = 4123.59412664434 Displaying array $iRows = 60000 Generating array = 2133.9393487735 Sorting array by column 0 Sorting array = 5399.97794762783 Sorting array by column 1 Sorting array = 5083.85636148603 Sorting array by column 2 Sorting array = 4944.67929728288 Sorting array by column 3 Sorting array = 5747.94969732011 Sorting array by column 4 Sorting array = 5037.79626988003 Displaying array $iRows = 70000 Generating array = 2445.89702594949 Sorting array by column 0 Sorting array = 6429.4995912277 Sorting array by column 1 Sorting array = 6034.70311993969 Sorting array by column 2 Sorting array = 5900.32909563942 Sorting array by column 3 Sorting array = 6903.26765734271 Sorting array by column 4 Sorting array = 6027.34937412542 Displaying array $iRows = 80000 Generating array = 2805.65848355588 Sorting array by column 0 Sorting array = 7468.49128806631 Sorting array by column 1 Sorting array = 7060.91469139561 Sorting array by column 2 Sorting array = 6864.93254495179 Sorting array by column 3 Sorting array = 8110.69459708571 Sorting array by column 4 Sorting array = 6996.29736238669 Displaying array $iRows = 90000 Generating array = 3159.49876841934 Sorting array by column 0 Sorting array = 8534.18796433611 Sorting array by column 1 Sorting array = 8005.49702473052 Sorting array by column 2 Sorting array = 7811.69684415594 Sorting array by column 3 Sorting array = 9256.5217258807 Sorting array by column 4 Sorting array = 8016.83709696589 Displaying array $iRows = 100000 Generating array = 3479.57703771814 Sorting array by column 0 Sorting array = 9648.39958233472 Sorting array by column 1 Sorting array = 9036.15148428256 Sorting array by column 2 Sorting array = 8904.49328164509 Sorting array by column 3 Sorting array = 10498.6470758859 Sorting array by column 4 Sorting array = 9075.35483956761 Displaying array Windows 10: $iRows = 10000 Generating array = 469.5655 Sorting array by column 0 Sorting array = 1047.509 Sorting array by column 1 Sorting array = 1004.8089 Sorting array by column 2 Sorting array = 942.9591 Sorting array by column 3 Sorting array = 1002.2672 Sorting array by column 4 Sorting array = 951.8781 $iRows = 20000 Generating array = 916.4006 Sorting array by column 0 Sorting array = 2061.4822 Sorting array by column 1 Sorting array = 1992.4709 Sorting array by column 2 Sorting array = 1924.7481 Sorting array by column 3 Sorting array = 2127.4384 Sorting array by column 4 Sorting array = 1936.3358 Displaying array $iRows = 30000 Generating array = 1372.8649 Sorting array by column 0 Sorting array = 3244.5609 Sorting array by column 1 Sorting array = 3180.6722 Sorting array by column 2 Sorting array = 3092.1707 Sorting array by column 3 Sorting array = 3382.2133 Sorting array by column 4 Sorting array = 3058.7045 Displaying array $iRows = 40000 Generating array = 1856.9411 Sorting array by column 0 Sorting array = 4525.1955 Sorting array by column 1 Sorting array = 4296.5849 Sorting array by column 2 Sorting array = 4182.7308 Sorting array by column 3 Sorting array = 4746.0117 Sorting array by column 4 Sorting array = 4244.3555 Displaying array $iRows = 50000 Generating array = 2382.5111 Sorting array by column 0 Sorting array = 5770.5723 Sorting array by column 1 Sorting array = 5710.5163 Sorting array by column 2 Sorting array = 6483.6553 Sorting array by column 3 Sorting array = 7055.8409 Sorting array by column 4 Sorting array = 6588.6965 Displaying array $iRows = 60000 Generating array = 2751.5795 Sorting array by column 0 Sorting array = 7473.5253 Sorting array by column 1 Sorting array = 6755.4111 Sorting array by column 2 Sorting array = 6581.2973 Sorting array by column 3 Sorting array = 7716.1906 Sorting array by column 4 Sorting array = 6670.898 Displaying array $iRows = 70000 Generating array = 3159.6544 Sorting array by column 0 Sorting array = 8270.8446 Sorting array by column 1 Sorting array = 7956.5928 Sorting array by column 2 Sorting array = 7698.139 Sorting array by column 3 Sorting array = 8988.3115 Sorting array by column 4 Sorting array = 7851.209 Displaying array $iRows = 80000 Generating array = 3610.7372 Sorting array by column 0 Sorting array = 9663.0729 Sorting array by column 1 Sorting array = 9416.2116 Sorting array by column 2 Sorting array = 9397.7431 Sorting array by column 3 Sorting array = 10748.4111 Sorting array by column 4 Sorting array = 9382.0706 Displaying array $iRows = 90000 Generating array = 4181.5457 Sorting array by column 0 Sorting array = 11512.0692 Sorting array by column 1 Sorting array = 10848.8297 Sorting array by column 2 Sorting array = 10596.1946 Sorting array by column 3 Sorting array = 12445.5149 Sorting array by column 4 Sorting array = 10686.9957 Displaying array $iRows = 100000 Generating array = 4784.8767 Sorting array by column 0 Sorting array = 12814.0628 Sorting array by column 1 Sorting array = 12111.9869 Sorting array by column 2 Sorting array = 11753.6472 Sorting array by column 3 Sorting array = 14061.7319 Sorting array by column 4 Sorting array = 12092.2128 Displaying array Most of the code is copied from Data display functions. That's a lot of code. And it isn't mainstream code. ArrayDisplay.7z
    1 point
  4. Professor_Bernd, Glad you like StringSize - here it is being used to create a scrolling section in an "About" GUI: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include "StringSize.au3" Local $hInfo_Win = GUICreate("About App", 300, 150, -1, -1, BitOR($WS_POPUPWINDOW, $WS_CAPTION)) GUISetBkColor(0xCCCCFF) Local $cClose_Info_Button = GUICtrlCreateButton("Close", 190, 115, 80, 30) GUISetState(@SW_SHOW, $hInfo_Win) $sMsg = "My App" & @CRLF & "(c) Me" GUICtrlCreateLabel($sMsg, 10, 115, 150, 40) ; Size label to scroll Local $iScroll_Win_Width = 200 Local $iScroll_Win_Depth = 85 $sMsg = $sMsg & @CRLF & @CRLF & _ "This software is released as Freeware. It is provided 'as-is', without any express or implied warranty. " & _ "In no event shall the author be held liable for any damages arising from the use of this software." & @CRLF & @CRLF & _ "Permission is granted to anyone to use this software for any purpose, including commercial applications, " & _ "and to redistribute it, provided that the following conditions are met:" & @CRLF & @CRLF & _ "1. All redistributions in binary form must retain all occurrences of the above copyright notice " & _ "and the acknowledgements below." & @CRLF & @CRLF & _ "2. Modified versions in source or binary form must be plainly marked as such, and must not be " & _ "misrepresented as being the original software." & @CRLF & @CRLF & _ " Acknowledgements:" & @CRLF & @CRLF & _ "App built using AutoIt v" & @AutoItVersion & @CRLF & _ "(www.autoitscript.com/autoit3)" Local $aScroll_Size = _StringSize($sMsg, Default, Default, Default, Default, $iScroll_Win_Width - 2) Local $iScroll_Label_Depth = $aScroll_Size[3] ; Create and enable scroll child $aWin_Pos = WinGetPos($hInfo_Win, "") Local $hScroll_Win = GUICreate("Scroller", $iScroll_Win_Width, $iScroll_Win_Depth, -1, -1, $WS_POPUP, $WS_EX_MDICHILD, $hInfo_Win) WinMove($hScroll_Win, "", $aWin_Pos[0] + 70, $aWin_Pos[1] + 37) ; Create scrolling label Local $cScroll_Label = GUICtrlCreateLabel($aScroll_Size[0], $aWin_Pos[0] + 70, $aWin_Pos[1] + 37, $iScroll_Win_Width - 2, $iScroll_Label_Depth) ; Set transparency to permit dragging without artefacts WinSetTrans($hScroll_Win, "", 250) GUISetState(@SW_SHOW, $hScroll_Win) ; Reactivate main dialog WinActivate($hInfo_Win) Local $aMsg While 1 For $i = $iScroll_Win_Depth To -$iScroll_Label_Depth Step -1 $aMsg = GUIGetMsg(1) Switch $aMsg[1] Case $hInfo_Win Switch $aMsg[0] Case $GUI_EVENT_CLOSE, $cClose_Info_Button GUIDelete($hInfo_Win) Exit EndSwitch EndSwitch ControlMove($hScroll_Win, "", $cScroll_Label, 1, $i) Sleep(50) ; Needed to slow the scroll! Next WEnd That might be something you could use.... M23
    1 point
  5. what you are looking for is at this link: https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2?view=webview2-1.0.622.22#executescript here an example using that method: https://www.autoitscript.com/forum/topic/204362-microsoft-edge-webview2-embed-web-code-in-your-native-application/?do=findComment&comment=1474843
    1 point
  6. You could use CLSID of special folders. Or refer to shell.application to find the "real" folder name by using special shell name : $sFolder = $oShellApplication.Namespace('shell:My Pictures').Self.Path There is also a number of folder constants that can serve as folder namespaces with shell.application object too.
    1 point
  7. Perhaps the crossed wires come from the differing requirements of the sister functions Eval and Execute, as shown here: Eval: Local $iA = Eval("iB") Execute: Local $iA = Execute("$iB + 1") To my mind, Eval should be called Recall() (to go with Assign()), and Execute should be renamed Eval() cuz thats what it does.
    1 point
  8. Note that what we translate into AutoIt is Windows API functions and not .NET code. Study the Scripting example in the Getting started examples.
    1 point
  9. @davidkim please fix your signature.
    1 point
  10. All AutoIt code that exists in relation to Microsoft Edge (Chromium) and WebView2 can be found in the original thread. And the existing code is so far largely limited to a translation of the Getting started with WebView2 examples into AutoIt. You can download the AutoIt translation of the examples in bottom of this post. My examples here are all based on code in the original thread. So if you're interested in WebView2 code, study the original thread. But as already mentioned, not much code has been implemented so far. Sufficient code has simply not been implemented to make it practically usable in real-world examples. Much more of the code in WebView2.h (included in the code for the AutoIt examples) needs to be translated into AutoIt before the code is practically applicable in real examples.
    1 point
  11. @Chuckero Why not use _WD_UpdateDriver to automatically download the correct driver version? Hint: Search wd_helper.au3 for "$sDriverVersion" to see how to grab the driver version by launching the driver.
    1 point
  12. Something like this ? #include <WindowsConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> GUIRegisterMsg($WM_COMMAND, 'WM_COMMAND') Local $msg Local $hForm = GUICreate('Test ' , 400, 250) Local $Input = GUICtrlCreateEdit('', 10, 10, 380, 200, $WS_HSCROLL + $WS_VSCROLL + $ES_READONLY) Local $Button = GUICtrlCreateButton('Exit', 300, 220, 90, 20) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE OR $msg = $Button Then Exit WEnd Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) Local $nNotifyCode = BitShift($wParam, 16) Switch $lParam Case GUICtrlGetHandle($Input) Switch $nNotifyCode Case $EN_SETFOCUS DllCall('user32.dll', 'int', 'HideCaret', 'hwnd', $lParam) ; => _WinAPI_HideCaret($lParam) EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFUnc
    1 point
×
×
  • Create New...