bind YOUR_KB_KEY(like h) "vstr cycle1_toggle"
seta cycle1_toggle "vstr phrase_1"
seta phrase_1 "set cycle1_toggle vstr phrase_2; say THIS IS 1st MESSAGE"
seta phrase_2 "set cycle1_toggle vstr phrase_3; say THIS IS 2nd MESSAGE"
seta phrase_3 "set cycle1_toggle vstr phrase_1; say THIS IS LAST MESSAGE, NEXT WILL LOOPBACK TO 1st"
# Function
1. bind will bind key to 'vstr' op, which evals the contents of "cycle1_toggle".
2. the "cycle1_toggle" is main worker, it is continously rewritten with TWO things: a) copy of next instruction b) payload: say command
3. pay attention that at the very end (here "phrase_3"), the "a)" should point back to phrase_1 for loop to continue.
# How to use
copy the 5-line block somewhere above and modify it like this:
1. set bind key, one key will switch output on every press
2. modify the text in "say ___"
3. if you want to expand the loop (have more than 3 looped strings) do this:
3.1. duplicate the "seta phrase_2 ......" below "seta phrase_2"
3.2. change its "say ___" to new text
3.3. rename it from "seta phrase_2" to NEXT number
3.4. make sure that "seta phrase_3.." (4,5,6 etc) points to the next "...vstr phrase_4;.." (5,6,7 etc).
4. IMPORTANT the very command "seta phrase_N" (above its "seta phrase_3") should point to very first (here "vstr phrase_1") so it loops back.
# Do not modify
- cycle1_toggle variable name, it can be any, but should be same across code.
- you can add additional commands after "say ___" with semicolon (;), but note that flood protection may prevent outputting many phrases at once.
yw
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}