AutoClicker is an auto right clicking program with keyboard hotkeys to start and stop. The clicking interval/speed of clicks can be manually set as well as the number of clicks. There is a limit on the number of clicks when running "continuously" at 999,999 clicks.
AutoClicker is open source; however, this software uses an external library called JNativeHook. JNative hook can be found on GitHub.
JNativeHook is covered under both the GNU General Public and GNU Lesser General Public Licenses as the latter is an extension of the former granting you additional distribution rights. As I understand it, you may use this library in proprietary projects so long as it remains an external library with the same binary interface. You may modify the source code of this library to fulfill a proprietary need, as long as that source code is made public under the aforementioned terms. Please consult with a licensed attorney if you have license compatibility questions or concerns.