Chimaera

Comments within Arrays?

4 posts in this topic

I started a project few yrs ago now and the array has grown into a monster as i keep adding to it over 1100 items currently

Initially i had added a few comments then i alphabetized it to make it easier to find stuff then i did this

;~              Spotify|Shared C Run-time for x64|SugarSync Manager
$sRegKey &= '|Spotify|{EF79C448-6946-4D71-8134-03407888C054}|SugarSync'

Which was fine for a while but then as the array got so large i stopped notating them and just had the array segments like so

-443A-B65D-333F5ED6CCD0}|{DA20E1A8-07CB-4EE7-9B72-A7E28C953F0E}|AVG Secure Search'
; ¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬
;   B   B   B   B   B   B   B   B   B
$sRegKey &= '|Babylon|{83AA2913-C123-4146-85BD-AD8F9397

But ive realised now it would be nice to have the Comment for each file so i know what they are.

I could do this but the script would be a mile long

$sRegKey &= '|{A77A198F-B60B-481C-A645-64EE80849A12}' & _ ; Comment here
            '|{27F9068F-27D3-42FF-BE10-94CC94F46F33}' ; Comment here

Is there another way to have comments inline with the array like this mockup

$sRegKey &= '|{A77A198F-B60B-481C-A645-64EE80849A12}' & _ ; Comment here '|{A77A198F-B60B-481C-A645-64EE80849A12}' & _ ; Comment here
            '|{27F9068F-27D3-42FF-BE10-94CC94F46F33}' ; Comment here '|{27F9068F-27D3-42FF-BE10-94CC94F46F33}' ; Comment here

Im assuming not lol, or any other way i can notate without making the array ridiculously long?

Ps i only need it in the Scite window it wont show anywhere else

Any thoughts welcome

Share this post


Link to post
Share on other sites



If it's just one element per line in the array you could just read and write to a text / ini file. You could just add another column to your array and not call it that could be the comment. You could have a second uncalled array with the comments. Lot's of choices.


Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites

Im trying to keep them together explanation at the side of the item

but bear in mind its a visual thing in Scite for me to track them down, its not for the array, i suppose you could say its about the layout more than anything

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Have you given Regions any thought?

If you separate your arrays into some sort of "paragraph" form for lack of a better explanation or maybe some have commonalities and can be grouped...

and then just wrap them in regions with titles and only open them when you need to see the actual code.

example:

#Region  ; part 0001
$sRegKey &= '|{A77A198F-B60B-481C-A645-64EE80849A12}'
;===comments
            '|{27F9068F-27D3-42FF-BE10-94CC94F46F33}'
;===comments
#EndRegion
#Region  ; part 0002
$sRegKey &= '|{A77A198F-B60B-481C-A645-64EE80849A12}'
;===comments
            '|{27F9068F-27D3-42FF-BE10-94CC94F46F33}'
;===comments
#EndRegion
#Region  ; part 0001
#EndRegion
#Region  ; part 0002
#EndRegion

 

Edited by l3ill

Share this post


Link to post
Share on other sites

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