Leaderboard
Popular Content
Showing content with the highest reputation on 03/17/2025 in Posts
-
This is a UDF to use a Listview or Treeview as a File/Folder Explorer. You can also fine the TreeListExplorer UDF on Github. It allows to create a system, where a root folder can be set and that synchronizes all attached Tree or Listviews. So it is possible to attach multiple views to one system. Additionally, it is possible to add an Input Control as a View to show the current folder. When pressing {ENTER}, the system opens the path provided by the input. The following functions are available: ; #CURRENT# ===================================================================================================================== ; __TreeListExplorer_StartUp ; __TreeListExplorer_Shutdown ; __TreeListExplorer_CreateSystem ; __TreeListExplorer_DeleteSystem ; __TreeListExplorer_AddView ; __TreeListExplorer_RemoveView ; __TreeListExplorer_OpenPath ; __TreeListExplorer_Reload ; __TreeListExplorer_GetPath ; __TreeListExplorer_GetRoot ; __TreeListExplorer_GetSelected ; __TreeListExplorer_SetRoot ; =============================================================================================================================== When creating a System, a callback function can be provided to be called, when the root folder or the current folder changes. When adding a View, callback functions for single/double click at an item as well as a loading callback can be added. Example view: The Code for the Example to get a quick overview: If you like it, please leave me a comment, also if you have any suggestions to make it better or if you found bugs. I did a complete rework of this UDF (2025/03/02). Now it is easier to use and does not need external UDFs anymore. This also removes a lot of bugs, that were in the old version. It is also possible to freely select if folders and/or files should be visible in any view. Changelog: Version 1.0.0 (Old Version) Version 2.0.0 (New Version after rework) Version 2.1.0 - Rename $sCallbackOnSelect to $sCallbackOnClick - Add an additional callback $sCallbackOnSelectionChange, that is called whenever the Tree-/ListView item selection changes Version 2.2.0 - Improve loading speed for TreeView folders when expanding Version 2.3.0 - Fix some bugs where folders did not correctly expand/collapse when clicking them (when the root folder is not "" => shows all drives) - Fix some documentation - Add a method for reloading (__TreeListExplorer_Reload) the current folder (ListView/TreeView) or all folders (TreeView) - Remove the reload parameter from the __TreeListExplorer_OpenPath method (Replaced with __TreeListExplorer_Reload). - Other small internal changes Version 2.4.0 - Add the possibility to handle file/folder selections better - Files/Folders keep selected when reloading - The currently selected File/Folder can be checked with __TreeListExplorer_GetSelected - File selection is synchronized between all Tree-/Listviews, Folder selection only between ListViews (TreeView folder selection changes the current folder and expands it) - fixed minor issues Version 2.5.0 - Disabled TreeList expand with a single click and changed it to a double click - Selection is now synchronized for all files/folders between all views (Tree-/ListView) - The Selection callback is now moved from __TreeListExplorer_AddView to __TreeListExplorer_CreateSystem and only fires ones per change for the system and not for every view (as it was before) - All callbacks were changed to pass the selected folder and some additional information is now provided (clicked index/item, the loading path,...) - Small performance improvements - Some internal restructuring Version 2.5.1 - Fixed: selection not working for drives Version 2.6.0 - Added support for icons of all file extensions for TreeViews and ListViews. Version 2.7.0 - Input controls are now possible as a view. They show the current folder and when pressing {ENTER} inside, the system tries to open the path show in the input. - Changed the behavior of the treeview when clicking items. They now change the current folder, but are not expanded. This changes the folder in the ListView, when clicking a folder in the TreeView. Version 2.7.1 - Clicking on the Bitmap of a TreeView item is now registered as a click (not just the text like before) - Fixed a missing selection update when clicking on a TreeView item Version 2.7.2 - Add parameter for setting the (file-/folder-)icon size on startup Version 2.8.0 - TreeView selection is now triggering the select event and the $sSelect corresponds to the selected folder/file. NOTE: __TreeViewExplorer_GetSelected will be empty, if the selection is a folder in a treeview - Selection handling was improved, especially the synchronization between TreeView and ListView - Add keyboard navigation to the listview - Fixed a bug, where the icon index was sent as event (GuIGetMsg), when an item was clicked (happens without the udf message handling, so it needed a workaround: suppress the default autoit handler for mouseclicks) Version 2.8.1 - Fixed a bug, where the select callback was sometimes not send correctly Version 2.9.0 - Fixed bug for TreeViews, where folders were shown as expandable, when having only files but no folders, even if showing files was turned of - rework how treeviews are filled/updated/expanded (folders that are expanded will stay expanded on reload) - add the possibility to set a depth limit for the treeview (Example: Drive selection with $sRoot="" and $iMaxDepth=0) - Fixed bug for Arrow selection in the ListView to not trigger a click event anymore - When the open folder or the selection changed, the TreeView checks, if it still exists (=> treeview updates, if a folder was deleted) Version 2.9.1 - Workaround for a Bug in the GuiTreeView UDF (until it is fixed), causing random control deletions instead of TreeView item deletions Version 2.9.3 - Fixed custom icon size when extracting icons Version 2.9.4 - Improved display quality for some icons (Thanks WildByDesign for the work on that) - Fixed an issue, where cached file icons for individual files were shown as a folder Version 2.9.5 - Improved display quality for some icons (When resource files are defined in the registry, the one with the size greater or equal to the required icon size will be choosen) Version 2.10.0 - Added the possibility to filter ListViews/TreeViews with a callback function. This callbackfunction is called for every file/folder and only if it returns True, will they be added to the view. - Added the possibility to set $bNavigate for ListViews when adding them. This enables or disables the possibility to navigate through folders with doubleclicks in a ListView (and add/removes the ".." folder at the top, which enables the user to navigate to the parent folder) Special thanks to @WildByDesign for a lot of testing to help improving this UDF. TreeListExplorer.au3 TreeListExplorer-Example.au32 points
-
Seems you are running a quite old version of AutoIt. The Excel UDF has been rewritten some years ago. Means: A lot of functions have been removed, renamed or changed. Details can be found here. I suggest to use two calls to _Excel_RangeRead and assign the result to your array.1 point
-
MiniMark (a minimalistic rtf editor)
argumentum reacted to TheAutomator for a topic
argumentum, I added it to the example scripts to share it with users who like this kind of software, and to show others how to use the rich edit control and create custom GUIs. 🙂 The goal is to have a minimalistic RTF editor with files that have custom icons and open directly with MiniMark. Personally, I use it as a quick notes app for all kinds of lists (to-dos, series to binge, things to buy...) that I can just double-click and edit when needed. I'm not planning to tweak the icons, style, or add a huge amount of options becouse that would make it "maximalistic" . That being said, allowing users to choose the installation location is a great idea and will be added soon! Keep in mind that the software is designed to be compiled and installed (custom icons, fonts, and right-click menu entries). Making it portable would mean users have to manually open or drag icon-less files into the executable, which isn’t very convenient.. For testing the script as is please check the README: drag MiniMark.au3 into the MiniMark folder so it can access its files properly, then it should work. I'm doing my best to make it work as smooth as possible in my free time, but this is an open-source project in a forum full of developers who can tweak it to their liking. That doesn’t mean I’m ignoring requests, I gladly accept help with code and small handy improvements for those who want to contribute! It’s all about finding the right balance between keeping it light but good. An update is coming soon, so let’s see what I can do. 😃1 point -
FileExplorer Treeview and Listview (TreeListExplorer)
Kanashius reacted to WildByDesign for a topic
Thank you for getting to the root of the issue so quickly and for the fix. I am assuming that with your temporary/custom fix, I don't need to modify GuiTreeView.au3 now. Unless I use it for other projects, of course. Do you know if this specific issue has the potential to cause a crash? The reason why I ask is because, for quite a while now, I have had this very infrequent random crash that only happens when navigating the TreeView. It might happen after 2 or 3 minutes or it might not happen for 30 minutes. I haven't been able to figure out any details about the cause of the crash and it is quite rare, so I haven't dug into it deeper. This seems to work if I run the script from SciTE or from VSCodium. But if I just run the script from Explorer, it will still run as 32-bit on mine. I probably need to reinstall AutoIt and select 64-bit as default for running scripts since that is what I prefer. I put in some time with 2.9.1 lastnight and also a lot of time this morning and I have found zero issues with 2.9.1. The filesystem reloads are incredibly fast, keeps the selection properly and keeps the folder(s) expanded properly if they already were. Everything is working really well in this latest update. This UDF has reached perfection and will help many users who need such features. You're welcome. I am always happy to help in whatever ways I can. I find it amazing how you hadn't touched the UDF in around a decade (because it got overlooked and never got the attention it deserved) and you rewrite the entire thing, make it very performant with thorough features and great stability/reliability, and within a few weeks of quick updates you've got something truly amazing. Thank you for everything and also congrats on what you have achieved with this. TL;DR = This is too good!1 point -
Did you try automating with webdriver some other browser to check if its not headless browser related problem?1 point
-
FileExplorer Treeview and Listview (TreeListExplorer)
WildByDesign reacted to Kanashius for a topic
Ok, I found the issue. It is a Bug, that was already found in the TreeView UDF. But it was only fixed, if the provided ListView was a ControlID and not a ControlHandle (like I use). So for now, I wrote a custom _GuiCtrlTreeView_Delete method, that fixes that and I will report the bug. Details: This also explains the "hasChild" elements you had in your TreeViews before. They did not get deleted, but instead AutoIt tried to delete "random stuff" and sometimes that "random stuff" was the ListView. By the way: You do not need to exchange the AutoIt.exe files to run as x64. A simple #AutoIt3Wrapper_UseX64=Y at the beginning of the Script is enough. I hope that was the last issue for now. Thanks for the help, patience and testing @WildByDesign1 point -
yeah, but i already have something like this Local $PredefinedEntitiesInXML[5][2] = [[""",'"'],["&","&"],["'","'"],["<","<"],[">",">"]] For $k = 0 To UBound($PredefinedEntitiesInXML,1) - 1 $sSting = StringRegExpReplace($sSting,$PredefinedEntitiesInXML[$k][0],$PredefinedEntitiesInXML[$k][1]) Next what i wanted is $code = "Function func_unescape(x)" & @CRLF $code &= "func_unescape=unescape(x)" & @CRLF $code &= "end Function" $vbs = ObjCreate("ScriptControl") $vbs.language="vbscript" $vbs.addcode($code) $sString = $vbs.run("func_unescape",$sString)1 point