QuickTest “cheats” and checks every outcome of a conditional, even if it’s impossible to reach it, so no, I don’t think so.
You might be able to work around it by saying *if choice_quicktest, *goto somewhereelsethatavoidsrunningmycode… But I wouldn’t be surprised if it still tried to execute the rest.
Thanks @CJW. Something that works is that, if you do *if choice_quicktest, the code will be taken by quicktest, and not by the actual game. Still, there is apparently no way to exclude code in quicktest.
BTW, I fail to understand how that happens, as I don’t see an override to Scene.prototype[“if”] or Scene.prototype[“else”] in autotest.js. Do you know how quicktest follows both branches?