I have the training script tradeSouthGateSoloReturn.txt loaded. If the following code is executed, the set_training_script will always return True, so the part within the if clause will never be reached. From my understanding of the API documentation, set_training_script should return True once in this example and the next time None. So the bot would always switch between those two scripts.
Weird thing is, the bot correctly loads the tradeSouthGateSolo.txt script, but the UI in the Training Area tab won´t be updated.
def event_loop(): log('Plugin: '+pName+': Switch script to tradeSouthGateSolo.txt') isScriptLoaded = set_training_script(r'...\phbot\tradeSouthGateSolo.txt') log(str(isScriptLoaded)) if not isScriptLoaded: log('Plugin: '+pName+': Switch script to tradeSouthGateSoloReturn.txt') set_training_script(r'...\phbot\tradeSouthGateSoloReturn.txt')