Being inspired by the Comma List extension. One thing I do in my programming is creating a lot of Enums, sometimes with BitMask Options.
I’ll come up with a text list of what options I want for names, and then I always
have to do repeated entry of the same stuff over and over:
Going from:
Checked_None
Checked_Whitespace
Checked_EpisodeID
Checked_CatalogNo
Checked_Composer
etc..
To:
Checked_None = 0,
Checked_Whitespace = 1 << 0,
Checked_EpisodeID = 1 << 1,
Checked_CatalogNo = 1 << 2,
Checked_Composer = 1 << 3,
etc..
And Sometimes To Help Me with MultiMask I’ll Add Integer Values as Comments:
Checked_None = 0,
Checked_Whitespace = 1 << 0, // 1
Checked_EpisodeID = 1 << 1, // 2
Checked_CatalogNo = 1 << 2, // 4
Checked_Composer = 1 << 3, // 8
etc.
And sometimes not using BitMasks but starting a different value than zero IE.5:
Checked_None = 5,
Checked_Whitespace = 6,
Checked_EpisodeID = 7,
Checked_CatalogNo = 8,
Checked_Composer = 9,
etc.
See my AppleScript Code in next reply. Where I use options selected by Key
Modifier Masks:
DEFAULT - use bit mask mode
SHIFT - to add bit integer value comments
OPTION (ALT) - to turn off bit mask mode
COMMAND - to turn off bit mask mode and use different start offset
^^^^ in this mode the user is presented with a dialog to enter their start offset
(defaults to 1)
I’ll soon be packaging this to a PopClip Extension after testing some more: