Q1: No, at least without using user32.dll in order to simulate human input.
Q2: Before hacking this, with your level of coding you should be able to write an simple optimiser by yourself instead.
Basically it is “only” a recursive loop in order to test different parameter setups (genes) for maximum or minimum outcome (fitness)