t2:macro_stop

macro_stop


macro_stop - Stop a macro

Description


macro_stop();

Stop the execution or recording of the macro file initiated by macro_run or macro_rec.

Examples


Example #1 macro_stop() example

main {
    // While BUTTON_2 is held-down ...
    if(get_val(BUTTON_2)) {
        // ... keep the macro "Example" running in an endless loop.
        macro_run("Example.gmk");
    } else if(macro_time() >= 0) { // Else if there is a macro running ...
        // ... stop it immediately.
        macro_stop();
    }
}

See Also

t2/macro_stop.txt · Last modified: 2018/06/27 04:49 by J2Kbr