ScratchData LogoScratchData
Back to 2grw's profile

executor test

2G2grw•Created October 7, 2024
executor test
0
0
11 views
View on Scratch

Instructions

const target = vm.runtime.getTargetForStage(); const questionVarName = '?'; const executeVarName = 'execute'; function getVariableByName(name) { return Object.values(target.variables).find(variable => variable.name === name); } function waitForVariable() { const questionVar = getVariableByName(questionVarName); const executeVar = getVariableByName(executeVarName); if (questionVar && Number(questionVar.value) === 1) { questionVar.value = 0; if (executeVar) { try { eval(executeVar.value); } catch (error) { } } executeVar.value = ''; setTimeout(waitForVariable, 100); } else { setTimeout(waitForVariable, 100); } } const questionVar = getVariableByName(questionVarName); if (questionVar) { questionVar.value = 'start'; } waitForVariable();

Description

need to have blokclive extentiion to execute it. #executor #test

Project Details

Project ID1077645371
CreatedOctober 7, 2024
Last ModifiedOctober 7, 2024
SharedOctober 7, 2024
Visibilityvisible
CommentsAllowed