Add Sections of Your Autohotkey Script to Obfuscation Classes

Create a Non-Secured Obfuscation Class

You can add sections of your Autohotkey code to an obfuscation class and you can make that class secured if you want. Function implementations and label implementations found within that section will be added to the class. Neither variables nor parameters can be added to classes at this time.
To add stuff to a class, use the ADDFOLLOWING_TOCLASS command comment and specify a new class name.
;$OBFUSCATOR: $ADDFOLLOWING_TOCLASS: (new class name)
To stop adding stuff to a class, use that command without a class name:
;$OBFUSCATOR: $ADDFOLLOWING_TOCLASS:
That code will create a non secured class. The only use of a non-secure class is to use it in a custom scrambling pallette.

Create a Secured Obfuscation Class

With secured class you have the ability to 'break' whole sections of code at once and all calls to functions or labels within that section will become invalid. You must first have created a non-secure class using the ADDFOLLOWING_TOCLASS command.
To make it into a secured class, use the CREATEOBJCLASS command
;$OBFUSCATOR: $CREATEOBJCLASS: (new class name)
and specify the same class-name you used in the ADDFOLLOWING_TOCLASS command:
;$OBFUSCATOR: $ADDFOLLOWING_TOCLASS: (new class name)

function implementations and label implementations

;$OBFUSCATOR: $ADDFOLLOWING_TOCLASS:

;$OBFUSCATOR: $CREATEOBJCLASS: (same class name)

DUMP to Initialize Object Name Fragments for Secure Classes

For every secured class you must use this series of statements below. These statements will dump both the function fragments and the label fragments for secured classes.
;$OBFUSCATOR: $DUMP_SECFRAGS_FORCLASSES: (class or class list)
OR
;$OBFUSCATOR: $DUMPPOISONED_SECFRAGS_FORCLASSES: (class or class list)

THEN
;$OBFUSCATOR: $DUMP_TMESSFRAGS_FORCLASSES: (class or class list)
;$OBFUSCATOR: $DUMPFRAGS_FORCLASSES: (class or class list)
The security fragments must be dumped first, followed by the tmess fragments, followed by the fragments. To use the dump poisoned fragments, use it before you dump the tmess fragments and the fragments. These statements can be used as many times in your code as you want including dumping the same fragments more than once.

Generally you'll want to physically separate the first one from the last two in the code because the first one can be replaced with the DUMPPOISONED_SECFRAGS_FORCLASSES command which would then corrupt the execution of the DUMPs which follow. A good approach is to use an if to select between the 2 different first statements and put the last two statements in a function by themselves. See the section below on poisoning variable security fragments.

DUMP Poisoned Variable Security Fragments for Secure Classes

Once you have created a secure class of functions and labels, you can break or poisen them at any time you want. You can start out your program with them broken, and you can break them at any point during the normal running of your program when a security violation is detected. A template for doing this is shown below.

Start out with your class poisoned
;$OBFUSCATOR: $DUMPPOISONED_SECFRAGS_FORCLASSES: expressmenu
Put the dumps in a function by themselves
dumpexpressmenu() {

global
;$OBFUSCATOR: $DUMP_TMESSFRAGS_FORCLASSES: expressmenu
;$OBFUSCATOR: $DUMPFRAGS_FORCLASSES: expressmenu
}
Put this in your autoexecute section or in a function
if (securityPASSED) {

;this statement will override the poisoned statement above
;$OBFUSCATOR: $DUMP_SECFRAGS_FORCLASSES: expressmenu
}
;execute the rest of the DUMPs for this class
dumpexpressmenu()
This can be placed anywhere in your code to break classes on the fly
if (securityFAILED) {

;$OBFUSCATOR: $DUMPPOISONED_SECFRAGS_FORCLASSES: expressmenu
;this has to be done after the DUMP POISONED in order for it to 'take'
dumpexpressmenu()
}