Jump to content

Recommended Posts

Posted

ACL Viewer (WildByDesign/ACLViewer: ACL Viewer for Windows)

This would not have been possible without the amazing support from this forum. I received so much great help and I am thankful. I wanted to give back to the community by sharing what I have come up with. I overcame a lot of challenges. So I am hoping that this (or parts of this) may benefit others.

I have other AutoIt-created programs on my GitHub also which I will likely share here in the forum when I have more time to get all the information together.

Screenshot:

ACLViewer.thumb.png.9662928b50af1423a2510c4694ee6789.png

Features:

  • automatic dark mode / light mode depending on system theme settings
  • treeview for selecting files/folders for viewing ACLs
  • listview for displaying parsed ACEs
  • custom ACCESS_MASK parser
  • listviews for displaying permissions with checkboxes

Includes:

There are other functions within the code that I received incredible help on from the forum and I added credits and links within the code.

Posted
...
#include <Misc.au3>
Global $isDarkMode = False
Global $sRet, $aRet, $newItem, $oldItem, $isFolder, $aUniques, $TV_Icons
#include "include\GUIFrame.au3"
...

would solve that. But also:

;~ isDarkMode()
;~ Func isDarkMode()
;~  Global $isDarkMode = _WinAPI_ShouldAppsUseDarkMode()
;~ EndFunc   ;==>isDarkModeisDarkMode()
;-------------------------------------------------------------
;~ Global $isDarkMode = isDarkMode()
;~ Func isDarkMode()
;~  Return _WinAPI_ShouldAppsUseDarkMode()
;~ EndFunc   ;==>isDarkMode
;-------------------------------------------------------------
Global $isDarkMode = _WinAPI_ShouldAppsUseDarkMode()
;-------------------------------------------------------------

this could be simplified.

Using 

#AutoIt3Wrapper_Au3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7

would force you to confront these things.

At one year old ( you joined less than a year ago ), your script is better than I ever did at 1 year old. :)

Thanks for sharing @WildByDesign

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Posted
4 hours ago, Nine said:

Got this error in GUIFrame :

Thank you for mentioning this. I will have it fixed in the next build.

3 hours ago, argumentum said:
...
#include <Misc.au3>
Global $isDarkMode = False
Global $sRet, $aRet, $newItem, $oldItem, $isFolder, $aUniques, $TV_Icons
#include "include\GUIFrame.au3"
...

would solve that.

This is really neat. I am still very new to AutoIt, so I had never thought of adding some Global variables before specific includes. It works great, thank you. It changed my way of thinking as well since being a script, it goes in order line by line. That way it is declared before the other include is loaded. This seems so simple, yet I did not know. So I appreciate it.

Also thank you for the simplification of the dark mode function, that is incredible. This makes me excited to learn more about AutoIt and improve my abilities.

Posted (edited)

Personally I dislike declaring variables between includes.  It should be declared inside the included file.  All UDF should be auto-sufficient. No offense.

edit : if you need to share a global variable between UDF, the source UDF should provide a function to retrieve that variable instead of relying on the knowledge of a variable name...

Edited by Nine
Posted
1 hour ago, Nine said:

Personally I dislike declaring variables between includes.

2 hours ago, WildByDesign said:

I am still very new to AutoIt

... today I was telling a neighbor about a project her husband was doing and told her about material aging and fatigue but that I don't correct people that much anymore because with time they end up learning and doing, one failure at the time :lol:

The WiKi as this "Best coding practices" and is a good read. The way that I lean a lot is reading and messing with the UDFs that come with AutoIt.
Still I read old code of mine and ask myself "why ?, why this way !" because with time I learned to better structure code. The kind of thing that people like @Nine say.

Your current version is functional and that is good. If you code it as if it was to be a UDF that you later add a GUI to, better :)

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Posted
40 minutes ago, argumentum said:

with time they end up learning and doing, one failure at the time

I agree 100%. And that is probably the way that I have learned the most at every aspect of life. Taking things apart, breaking things and figuring it out later.

I will definitely read that Best coding practices tonight. Cheers!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...