Skip to content

Instantly share code, notes, and snippets.

@tjvr
Last active November 3, 2016 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tjvr/bf635170a4441d5bbaac8fde05685c77 to your computer and use it in GitHub Desktop.
Save tjvr/bf635170a4441d5bbaac8fde05685c77 to your computer and use it in GitHub Desktop.
all the workarounds
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"!pip3 install bs4 requests lxml"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import requests\n",
"from bs4 import BeautifulSoup\n",
"import bs4"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"r = requests.get(\"https://wiki.scratch.mit.edu/w/index.php?title=List_of_Block_Workarounds\")"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"soup = BeautifulSoup(r.content, 'lxml')"
]
},
{
"cell_type": "code",
"execution_count": 44,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"out = []\n",
"for row in soup.find_all('tr'):\n",
" cells = [t for t in row.children if isinstance(t, bs4.Tag)]\n",
" if not cells:\n",
" continue\n",
" left, right = cells\n",
" code = left.find('code')\n",
" if not code:\n",
" continue\n",
" for workaround in right.find_all('pre'):\n",
" out.append((code.text, workaround.text))"
]
},
{
"cell_type": "code",
"execution_count": 45,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"[('when green flag clicked',\n",
" '\\nwhen I receive [Scratch-StartClicked v]\\n. . .\\n'),\n",
" ('when green flag clicked',\n",
" '\\nwhen [timer v] > (-1) // This is a block that can not be stopped\\nif <<((mouse y) = [180]) and <mouse down?>> or <(clicked) = [0]>> then\\nset [clicked v] to [1]\\n. . .\\n'),\n",
" ('when [space v] key pressed',\n",
" 'when [timer v] > (-1) // This is a block that can not be stopped, therefore you can make a workaround that does not require the green flag to be clicked\\nforever\\nwait until <key [space v] pressed?>\\n. . .'),\n",
" ('when this sprite clicked',\n",
" '\\nwhen [timer v] > (-1) // This is a block that can not be stopped, therefore you can make a workaround that does not require the green flag to be clicked\\nforever\\n wait until <<touching [mouse-pointer v]?> and <mouse down?>> //This is not an exact workaround, because you could, first, while not touching the Sprite, hold down your mouse, then, still holding down your mouse, move it over to the sprite. This will not activate the true block but will activate this.\\n\\n . . .\\n'),\n",
" ('when this sprite clicked',\n",
" '\\nwhen [timer v] > (-1) // This is a block that can not be stopped, therefore you can make a workaround that does not require the green flag to be clicked\\nforever\\nif <<mouse down> and <not<touching [mouse pointer v]>>> then\\nset [down? v] to [1]\\nwait until <not<mouse down>>\\nset [down? v] to [0]\\nend\\nend // This makes sure the script will not activate if you are holding down the mouse and then move it onto the sprite.\\n\\nwhen [timer v] > (-1) // This is a block that can not be stopped, therefore you can make a workaround that does not require the green flag to be clicked\\nforever\\nif <<touching [mouse pointer v]> and <<mouse down> and <(down) = [0]>>> then\\n. . .\\nend\\n'),\n",
" ('when [loudness v] > (10)',\n",
" '\\nwhen gf clicked // You can not use the greater than block to work around the green flag, because the greater than block is the block you want to work around\\nforever\\n wait until <(loudness) > (10)>\\n . . .\\n'),\n",
" ('broadcast [message v]',\n",
" '\\nwhen gf clicked\\nset [broadcasted? v] to [0]\\n. . .\\nset [broadcasted? v] to [1]\\n\\nwhen gf clicked\\nforever\\nwait until <(broadcasted?) = [1]>\\n. . .\\nset [broadcasted? v] to [0]\\nend\\n'),\n",
" ('broadcast [message v]',\n",
" '\\nbroadcast [broadcast v] and wait\\nwhen I receive [broadcast v]\\n. . . // whatever comes after the broadcast, in addition to the receive block you would have\\n'),\n",
" ('broadcast [message v] and wait',\n",
" '\\nwhen gf clicked\\nset [broadcasted? v] to [0]\\nset [wait v] to [0]\\n. . .\\nset [broadcasted? v] to [1]\\nset [wait v] to [1]\\nwait until <(wait) = [0]>\\n. . .\\n\\nwhen gf clicked\\nforever\\nwait until <(broadcasted?) = [1]>\\n. . .\\nset [broadcasted? v] to [0]\\nset [wait v] to [0]\\nend\\n'),\n",
" ('broadcast [message v] and wait',\n",
" '\\nset [wait v] to [3] // however many receive blocks you have for that particular broadcast\\nbroadcast [broadcast v]\\nwhen I receive [broadcast v]\\n. . .\\nchange [wait v] by (-1) // be sure to but this right before any \"stop script\" blocks, too!\\n'),\n",
" ('wait (1) secs', '\\nrest for (((tempo) / (60)) * (1)) beats\\n'),\n",
" ('wait (1) secs',\n",
" '\\nreset timer\\nrepeat until <not <(timer) < [1]>>\\n// Put no blocks here.\\nend\\n// If you are using other scripts that involve the timer, this might mess them up'),\n",
" ('forever',\n",
" 'repeat until <> // Put no boolean in the block or put a boolean that will always equals false (1=2).\\n. . .\\nend'),\n",
" ('forever', '\\nrepeat ([10 ^ v] of (309)\\n. . .\\n'),\n",
" ('repeat (10)',\n",
" '\\nset [counter v] to [0]\\nrepeat until <(counter) = [10]>\\nchange [counter v] by (1)\\n. . .\\nend\\n'),\n",
" ('repeat until <>',\n",
" '\\ndefine loop\\nif <not <. . .>> then\\n. . .\\nloop\\nend\\n'),\n",
" ('repeat until <>',\n",
" '\\nbroadcast [loop v]\\n\\nwhen I receive [loop v]\\nif <not <. . .>> then\\n. . .\\nbroadcast [loop v]\\nend\\n'),\n",
" ('if <> then',\n",
" '\\nif <. . .> then\\n. . .\\nelse\\n// Put no blocks here.\\nend\\n'),\n",
" ('if <> then',\n",
" '\\nbroadcast <. . .> and wait\\n\\nwhen I receive [true v]\\n. . .\\n'),\n",
" ('if <> then',\n",
" '\\nwhen gf clicked\\nforever\\nwait until <. . .>\\n. . .\\n// That assumes a forever loop around the if\\n'),\n",
" ('if <> then\\nelse',\n",
" '\\nif <> then\\n. . .\\nend\\nif <not <>> then\\n. . .\\nend\\n'),\n",
" ('if <> then\\nelse',\n",
" '\\ndefine if <boolean>\\nif <boolean> then\\n. . . // whatever would be in if\\nstop [this script v]\\nend\\nwhen gf clicked\\n. . .\\nif <. . .> then\\n. . .//whatever would be in else\\n//that assumes the if/else is the last block\\n'),\n",
" ('wait until <>', 'repeat until < . . . >\\n// Put no blocks here.\\nend\\n'),\n",
" ('stop [this script v]', '\\nwait until <> // Put no boolean in the block.\\n'),\n",
" ('stop [this script v]',\n",
" \"wait ([10 ^ v] of (309)) secs // These do not actually *stop* the script, the blocks only start and don't end\\n\"),\n",
" ('stop [this script v]', '\\nforever\\n// Put no blocks here.\\n'),\n",
" ('stop [all v]',\n",
" '\\nwhen I receive [stop all v]\\nstop [other scripts in sprite v]\\n// It must be put in every Sprite and the Stage.\\n'),\n",
" ('(direction)', '([direction v] of [wanted sprite v])'),\n",
" ('(x position)', '([x position v] of [wanted sprite v])'),\n",
" ('(y position)', '([y position v] of [wanted sprite v])'),\n",
" ('go to [mouse-pointer v]', 'go to x: (mouse x) y: (mouse y)'),\n",
" ('go to [wanted sprite v]',\n",
" 'go to x: ([x position v] of [wanted sprite v]) y: ([y position v] of [wanted sprite v])'),\n",
" ('go to [wanted sprite v]',\n",
" 'set x to: ([x position v] of [wanted sprite v])\\nset y to: ([y position v] of [wanted sprite v])\\n'),\n",
" ('go to x: () y: ()', 'set x to (x value)\\nset y to (y value)'),\n",
" ('go to x: () y: ()', 'glide (0) secs to x: () y: ()'),\n",
" ('point towards [ v]',\n",
" '\\nset [delta_x v] to (([x position v] of [wanted sprite v]) - (x position))\\nset [delta_y v] to (([y position v] of [wanted sprite v]) - (y position))\\nif<(delta_y) = [0]> then\\nif<(delta_x) < [0]> then\\npoint in direction (-90 v)\\nelse\\npoint in direction (90 v)\\nend\\nelse\\nif<(delta_y) < [0]> then\\npoint in direction ((180) + ([atan v] of ((delta_x) / (delta_y))))\\nelse\\npoint in direction ([atan v] of ((delta_x) / (delta_y)))\\nend\\nend\\n'),\n",
" ('point in direction (90 v)', '\\nturn cw ((90) - (direction)) degrees\\n'),\n",
" ('point in direction (90 v)',\n",
" '\\nturn ccw ((-1) * ((90) - (direction))) degrees\\n'),\n",
" ('turn right (15) degrees', '\\npoint in direction ((direction) + (15))\\n'),\n",
" ('turn left (15) degrees', '\\npoint in direction ((direction) - (15))\\n'),\n",
" ('move (10) steps',\n",
" '\\ngo to x: ((x position) + (([sin v] of (direction)) * (10))) y: ((y position) + (([cos v] of (direction)) * (10)))\\n'),\n",
" ('move (10) steps',\n",
" '\\nchange x by (([sin v] of (direction)) * (10))\\nchange y by (([cos v] of (direction)) * (10))\\n'),\n",
" ('change x by (10)', 'set x to ((x position) + (10))'),\n",
" ('change y by (10)', 'set y to ((y position) + (10))'),\n",
" ('set x to (0)', 'change x by ((wanted x) - (x position))'),\n",
" ('set x to (0)', 'change x by (((x position) * (-1)) + (wanted x))'),\n",
" ('set x to (0)', 'go to x: (wanted x) y: (y position)'),\n",
" ('set y to (0)', 'change y by ((wanted y) - (y position))'),\n",
" ('set y to (0)', 'change y by (((y position) * (-1)) + (wanted y))'),\n",
" ('set y to (0)', 'go to x: (x position) y: (wanted y)'),\n",
" ('turn motor on for (1) secs::extension',\n",
" 'motor on::extension\\nwait (number) secs\\nmotor off::extension'),\n",
" ('motor off::extension', 'turn motor on for (0) secs::extension'),\n",
" ('motor off::extension', 'set motor power (0)::extension'),\n",
" ('switch costume to [ v]',\n",
" '\\nrepeat until <(wanted costume #) = (costume #)>\\nnext costume\\nend\\n'),\n",
" ('next costume', 'switch costume to ((costume #) + (1))'),\n",
" ('switch backdrop to [ v]',\n",
" '\\nrepeat until <(wanted backdrop #) = (backdrop #)>\\nnext backdrop\\nend\\n'),\n",
" ('next backdrop', 'switch backdrop to ((backdrop #) + (1))'),\n",
" ('next backdrop', 'switch backdrop to [next backdrop v]'),\n",
" ('(costume #)', '([costume # v] of [wanted sprite v])'),\n",
" ('(backdrop #)', '([backdrop # v] of [Stage v])'),\n",
" ('(backdrop name)', '([backdrop name v] of [Stage v])'),\n",
" ('say [] for () secs', '\\nsay (text)\\nwait (amount) secs\\nsay []\\n'),\n",
" ('think [] for () secs', '\\nthink (text)\\nwait (amount) secs\\nthink []\\n'),\n",
" ('clear graphic effects',\n",
" '\\nset [color v] effect to (0)\\nset [fisheye v] effect to (0)\\nset [whirl v] effect to (0)\\nset [pixelate v] effect to (0)\\nset [mosaic v] effect to (0)\\nset [brightness v] effect to (0)\\nset [ghost v] effect to (0)\\n'),\n",
" ('(size)', '\\n([size v] of [wanted sprite v])\\n'),\n",
" ('change size by ()', '\\nset size to ((size) + (amount))%\\n'),\n",
" ('set size to () %', '\\nchange size by ((wanted size) - (size))\\n'),\n",
" ('go to front', '\\ngo back ((-1) * ([10 ^ v] of (309))) layers\\n'),\n",
" ('hide', 'set [ghost v] effect to (100)'),\n",
" ('hide', 'switch costume to [invisible costume v] '),\n",
" ('play sound [ v]',\n",
" '\\n. . .\\nbroadcast [continue script v]\\nplay sound [wanted sound v] until done\\n\\nwhen I receive [continue script v]\\n. . .\\n'),\n",
" ('play sound [ v] until done',\n",
" 'play sound [wanted sound v]\\nwait (length of sound) secs'),\n",
" ('rest for () beats', ' wait (((60) / (tempo)) * (beats)) secs'),\n",
" ('change volume by ()', 'set volume to ((volume) + (amount))%'),\n",
" ('set volume to () %', 'change volume by ((amount) - (volume))'),\n",
" ('(volume)', '([volume v] of [wanted sprite v])'),\n",
" ('change tempo by ()', 'set tempo to ((tempo) + (amount)) bpm'),\n",
" ('set tempo to () bpm', 'change tempo by ((amount) - (tempo))'),\n",
" ('(() + ())', '((a) - ((b) * (-1)))'),\n",
" ('(() + ())', '((a) - ((0) - (b)))'),\n",
" ('(() + ())', '\\nset [answer v] to (a)\\nchange [answer v] by (b)\\n'),\n",
" ('(() - ())', '((a) + ((b) * (-1)))'),\n",
" ('(() - ())', '((a) + ((b) / (-1)))'),\n",
" ('(() - ())', '((a) + (join [-](b)))'),\n",
" ('(() - ())', '\\nset [answer v] to ()\\nchange [answer v] by ((-1) * ())\\n'),\n",
" ('(() * ())',\n",
" 'delete (all v) of [num1 numbers v] //setup\\ndelete (all v) of [num2 numbers v]\\ndelete (all v) of [product digits v]\\nset [product v] to [0]\\nset [dec pos 1 v] to [0]\\nset [dec pos 2 v] to [0]\\nif <(answer) < [0]> then\\nset [count v] to [1]\\nset [no 1 negative v] to [y]\\nelse\\nset [count v] to [0]\\nset [no 1 negative v] to [n]\\nend\\nrepeat (length of ())\\nchange [count v] by (1)\\nif <not <(letter (count) of ()) = [.]>> then\\nadd (letter (count) of ()) to [num1 numbers v]\\nelse\\nset [dec pos 1 v] to ((length of (answer)) - (count))\\nend\\nend\\nif <() < [0]> then\\nset [count v] to [1]\\nset [no 2 negative v] to [y]\\nelse\\nset [count v] to [0]\\nset [no 2 negative v] to [n]\\nend\\nrepeat (length of ())\\nchange [count v] by (1)\\nif <not <(letter (count) of ()) = [.]>> then\\nadd (letter (count) of ()) to [num2 numbers v]\\nelse\\nset [dec pos 2 v] to ((length of (answer)) - (count))\\nend\\nend\\nset [num1 v] to (num1 numbers)\\nset [num2 v] to (num2 numbers)\\nrepeat (num1) //start\\nchange [product v] by (num2)\\nend\\nset [decimal position v] to ((dec pos 1) + (dec pos 2))\\nset [count v] to [0]\\nrepeat (length of (product))\\nchange [count v] by (1)\\nadd (letter (count) of (product)) to [product digits v]\\nend\\nif <not <(decimal position) = [0]>> then\\ninsert [.] at ((length of [product digits v]) - ((decimal position) - (1))) of [product digits v]\\nend\\nif <<<(no 1 negative) = [y]> or <(no 2 negative) = [y]>> and <not <<(no 1 negative) = [y]> and <(no 2 negative) = [y]>>>> then\\ninsert [-] at (1 v) of [product digits v]\\nend\\nset [product v] to (product digits)'),\n",
" ('(() * ())', '((a) / ((1) / (b))) // the product of \"a\" and \"b\" '),\n",
" ('(() * ())',\n",
" '\\nif <(a) < [0]> then\\nrepeat ([abs v] of (a))\\nchange [product v] by ((0) - (b))\\nend\\nelse\\nset [product v] to [0]\\nrepeat (a)\\nchange [product v] by (b)\\nend\\nend\\n'),\n",
" ('(() / ())',\n",
" \"\\ndelete (all v) of [dividend digits v]\\ndelete (all v) of [quotient v]\\nset [divident dev v] to [0]\\nset [dividend v] to ()\\nset [divisor v] to ([abs v] of ())\\nset [no2 neg v] to <() < [0] >\\nif <(dividend) < [0] > then\\n set [count v] to [1]\\nelse\\n set [count v] to [0]\\nend\\nset [no1 neg v] to <(dividend) < [0] >\\nrepeat (length of (dividend))\\n change [count v] by (1)\\n if <(letter (count) of (dividend)) = [.]> then\\n set [dividend dec v] to ((length of (dividend)) - (count))\\n else\\n add (letter (count) of (dividend)) to [dividend digits v]\\n end\\nend\\nrepeat ((10) - (dividend dec))\\n add [0] to [dividend digits v]\\nend\\nif <(round (divisor)) = (divisor)> then\\n set [dec pos v] to [0]\\nelse\\n set [count v] to [0]\\n repeat until <(letter (count) of (dividend)) = [.]>\\n change [count v] by (1)\\n end\\n set [dec pos v] to ((length of (divisor)) - (count))\\n set [dividend v] to ((dividend) * ([10 ^ v] of (dec pos)))\\n set [divisor v] to (round ((divisor) * ([10 ^ v] of (dec pos))))\\nend\\nset [count v] to [0]\\nset [currently solving v] to [] //That's an empty input, not a space.\\nrepeat (length of [dividend digits v])\\n change [count v] by (1)\\n set [currently solving v] to (join (currently solving) (item (count) of [dividend digits v]))\\n set [times v] to [9]\\n repeat until <((divisor) * (times)) < ((currently solving) + (1))>\\n change [times v] by (-1)\\n add [times v] to [quotient v]\\n set [currently solving v] to ((currently solving) - ((divisor) * (times)))\\nend\\ninsert [.] at ((length of [quotient v]) - (8)) of [quotient v]\\nrepeat until <not <<(item (last v) of [quotient v]) = [.]> or <<<(item (last v) of [quotient v]) = [0]> and <(round (quotient)) = (quotient)>> and <[quotient v] contains [.]>>>>\\n delete (last v) of [quotient v]\\nrepeat until <<not <(item (1 v) of [quotient v]) = [0]>> or <(item (2 v) of [quotient v]) = [.]>>\\n delete (1 v) of [quotient v]\\n\"),\n",
" ('(() / ())',\n",
" '\\nif <(b) < (0)> then\\n set [result v] to (((a) * ([e ^ v] of ((-1) * ([ln v] of ((-1) * (b)))))) * (-1))\\nelse\\n set [result v] to ((a) * ([e ^ v] of ((-1) * ([ln v] of (b)))))\\nend\\n'),\n",
" ('([] > [])', '\\n<<not <(a) < (b)>> and <not <(a) = (b)>>>\\n'),\n",
" ('([] < [])', '\\n<<not <(a) > (b)>> and <not <(a) = (b)>>>\\n'),\n",
" ('([] = [])', '\\n<<not <(a) < (b)>> and <not <(a) > (b)>>>\\n'),\n",
" ('([] = [])',\n",
" '\\ndelete (all v) of [list v] //case sensitive\\nadd (a) to [list v]\\nif <[list v] contains (b)> then\\n . . .\\nend\\n'),\n",
" ('<<> and <>>', '\\nif <. . .> then\\nif <. . .> then\\n. . .\\nend\\nend\\n'),\n",
" ('<<> and <>>', '\\n<not <<not <. . .>> or <not <. . .>>>>\\n'),\n",
" ('<<> and <>>',\n",
" '\\nset [var v] to [0]\\nrepeat until <(var) = [1]>\\n. . . // your block here, C-blocks loop inside\\nif <> then\\nset [var v] to [1]\\nend // this works for all current boolean-accepting blocks\\n'),\n",
" ('<<> and <>>',\n",
" '\\nif <> then\\nif <> then\\nset [return v] to [true]\\nelse\\nset [return v] to [false]\\nend\\nelse\\nset [return v] to [false]\\n'),\n",
" ('<<> or <>>',\n",
" '\\nif <. . .> then\\n. . .\\nelse\\nif <. . .> then\\n. . .\\nend\\nend\\n'),\n",
" ('<<> or <>>', '\\n<not <<not <. . .>> and <not <. . .>>>>\\n'),\n",
" ('<<> or <>>',\n",
" '\\nif <> then\\nset [return v] to [true]\\nelse\\nif <> then\\nset [return v] to [true]\\nelse\\nset [return v] to [false\\n'),\n",
" ('<not <>>', '<(. . .) = [false]>'),\n",
" ('<not <>>', '\\nif <> then\\n//Put no blocks here.\\nelse\\n. . .\\n'),\n",
" ('(join [][])',\n",
" 'set [count v] to [0]\\nset [final v] to []\\nrepeat (length of (a)) // a is the first input\\nchange [count v] by (1)\\nadd (letter (count) of (a)) to [final v]\\nend\\nset [count v] to (0)\\nrepeat (length of (b)) // b is the second input\\nchange [count v] by (1)\\nadd (letter (count) of (b)) to [final v]\\nend\\nset [final v] to (final) // This is the final string\\n'),\n",
" ('(join [][])',\n",
" \"\\n// this only works if they're both whole numbers and b is positive\\nset [return v] to []\\nrepeat (length of ())\\nset [return v] to ((return) * (10))\\nend\\nchange [return v] by ()\\n\"),\n",
" ('(letter (1) of [])',\n",
" \"// Only works for whole numbers and the letter you're looking for must be 1\\nif <[] > [0]> then\\nset [return v] to []\\nrepeat ((length of ()) - (1))\\nset [return v] to ([floor v] of ((return) / (10)))\\nend\\nelse\\nset [return v] to [-]\\nend\\n// all that's needed is a way to cut off the front digits.\\n\"),\n",
" ('(length of ())',\n",
" 'set [return v] to [1]\\nrepeat until <(letter ((return) + (1)) of ()) = []>\\nchange [return v] by (1)\\nend'),\n",
" ('(() mod ())',\n",
" '\\nif <(round ((a) / (b))) > ((a) / (b))> then\\nset [remainder v] to ((a) - ((round (((a) / (b)) - (0.5))) * (b)))\\nelse\\nset [remainder v] to ((a) - ((round ((a) / (b))) * (b)))\\nend\\n'),\n",
" ('(round ())',\n",
" 'set [report v] to []\\nset [count v] to [1]\\nrepeat until <<(letter (count) of (num)) = [.]> or <(count) = (length of (num))>>\\nset [report v] to (join (report) (letter (count) of (num)))\\nchange [count v] by (1)\\nend\\nif <<(letter (count) of (num)) = [.]> and <(letter ((count) + (1)) of (num)) > (4)>> then\\nchange [report v] by (1)\\nend'),\n",
" ('(round ())',\n",
" 'set [return v] to [0]\\nset [b v] to []\\nrepeat until <([abs v] of (b)) < (1)>\\nif <[] < [0]> then\\nchange [return v] by (1)\\nchange [b v] by (-1)\\nelse\\nchange [return v] by (-1)\\nchange [b v] by (1)\\nend\\nend'),\n",
" ('(round ())',\n",
" '\\ndefine round (#)\\nset [count v] to [1]\\nrepeat until <(letter (count) of (#))=[.]\\nchange [count v] by [1]\\nend\\nchange [count v] by [1]\\nif <(letter (count) of (#))=[5]> then\\nset [round v] to ([ceiling v] of (#))\\nelse\\nif <(letter (count) of (#))>[5]> then\\nset [round v] to ([ceiling v] of (#))\\nelse\\nif <(letter (count) of (#))<[5]> then\\nset [round v] to ([floor v] of (#)\\nend\\nend\\nend\\n'),\n",
" ('([10 ^ v] of ())',\n",
" '\\nset [output v] to (number)\\nif<(output) < (0)> then\\nset [output v] to ((-1) * (output))\\nend\\n'),\n",
" ('([10 ^ v] of ())',\n",
" '\\nset [output v] to (([sqrt v] of ((input) * (input))) + (0))\\n'),\n",
" ('([10 ^ v] of ())',\n",
" '\\nset [output v] to (input)\\nrepeat until <(output) = (input)>\\nset [output v] to ((((output) * (output)) + (input)) / ((2) * (output)))\\nend\\n'),\n",
" ('([10 ^ v] of ())',\n",
" '\\nset [output v] to ([e ^ v] of ((0.5) * ([ln v] of (input))))\\n'),\n",
" ('([10 ^ v] of ())',\n",
" '\\nset [output v] to (([log v] of (input)) / ([log v] of ([e ^ v] of (1))))\\n'),\n",
" ('([10 ^ v] of ())',\n",
" '\\nset [output v] to ([10 ^ v] of ((input) * (2.718281828459)))\\n'),\n",
" ('([10 ^ v] of ())',\n",
" '\\nset [output v] to (([ln v] of (input)) / ([ln v] of (10)))\\n'),\n",
" ('([10 ^ v] of ())',\n",
" '\\nset [output v] to ([e ^ v] of ((input) * ([ln v] of (10))))\\n'),\n",
" ('([10 ^ v] of ())', '\\nset [output v] to (round ((input) - (.5)))\\n'),\n",
" ('([10 ^ v] of ())', '\\nset [output v] to (round ((input) + (.49999999)))\\n'),\n",
" ('([10 ^ v] of ())', '\\nset [output v] to ([cos v] of ((90) - (input)))\\n'),\n",
" ('([10 ^ v] of ())', '\\nset [output v] to ([sin v] of ((90) - (input)))\\n'),\n",
" ('([10 ^ v] of ())',\n",
" '\\nset [output v] to (([sin v] of (input)) / ([cos v] of (input)))\\n'),\n",
" ('stamp',\n",
" '\\nset [stamping? v] to [true]\\ncreate clone of [myself v]\\nset [stamping? v] to [false]\\n\\nwhen I start as a clone // and any other hat blocks\\nif <(stamping?) = [true]> then\\nstop [this script v]\\nend\\n'),\n",
" ('ask [] and wait',\n",
" 'say (question)\\ndelete (all v) of [answer v]\\nset [count v] to [0]\\nrepeat until <<touching [mouse-pointer v]?> and <mouse down?>>\\nif <key [a v] pressed?> then\\nchange [count v] by (1)\\ninsert [A] at (count) of [answer v]\\nend\\nif <key [b v] pressed?> then\\nchange [count v] by (1)\\ninsert [B] at (count) of [answer v]\\nend\\nif <key [c v] pressed?> then\\nchange [count v] by (1)\\ninsert [C] at (count) of [answer v]\\nend\\nif <key [d v] pressed?> then\\nchange [count v] by (1)\\ninsert [D] at (count) of [answer v]\\nend\\nif <key [e v] pressed?> then\\nchange [count v] by (1)\\ninsert [E] at (count) of [answer v]\\nend\\nif <key [f v] pressed?> then\\nchange [count v] by (1)\\ninsert [F] at (count) of [answer v]\\nend\\nif <key [g v] pressed?> then\\nchange [count v] by (1)\\ninsert [G] at (count) of [answer v]\\nend\\nif <key [h v] pressed?> then\\nchange [count v] by (1)\\ninsert [H] at (count) of [answer v]\\nend\\nif <key [i v] pressed?> then\\nchange [count v] by (1)\\ninsert [I] at (count) of [answer v]\\nend\\nif <key [j v] pressed?> then\\nchange [count v] by (1)\\ninsert [J] at (count) of [answer v]\\nend\\nif <key [k v] pressed?> then\\nchange [count v] by (1)\\ninsert [K] at (count) of [answer v]\\nend\\nif <key [l v] pressed?> then\\nchange [count v] by (1)\\ninsert [L] at (count) of [answer v]\\nend\\nif <key [m v] pressed?> then\\nchange [count v] by (1)\\ninsert [M] at (count) of [answer v]\\nend\\nif <key [n v] pressed?> then\\nchange [count v] by (1)\\ninsert [N] at (count) of [answer v]\\nend\\nif <key [o v] pressed?> then\\nchange [count v] by (1)\\ninsert [O] at (count) of [answer v]\\nend\\nif <key [p v] pressed?> then\\nchange [count v] by (1)\\ninsert [P] at (count) of [answer v]\\nend\\nif <key [q v] pressed?> then\\nchange [count v] by (1)\\ninsert [Q] at (count) of [answer v]\\nend\\nif <key [r v] pressed?> then\\nchange [count v] by (1)\\ninsert [R] at (count) of [answer v]\\nend\\nif <key [s v] pressed?> then\\nchange [count v] by (1)\\ninsert [S] at (count) of [answer v]\\nend\\nif <key [t v] pressed?> then\\nchange [count v] by (1)\\ninsert [T] at (count) of [answer v]\\nend\\nif <key [u v] pressed?> then\\nchange [count v] by (1)\\ninsert [U] at (count) of [answer v]\\nend\\nif <key [v v] pressed?> then\\nchange [count v] by (1)\\ninsert [V] at (count) of [answer v]\\nend\\nif <key [w v] pressed?> then\\nchange [count v] by (1)\\ninsert [W] at (count) of [answer v]\\nend\\nif <key [x v] pressed?> then\\nchange [count v] by (1)\\ninsert [X] at (count) of [answer v]\\nend\\nif <key [y v] pressed?> then\\nchange [count v] by (1)\\ninsert [Y] at (count) of [answer v]\\nend\\nif <key [z v] pressed?> then\\nchange [count v] by (1)\\ninsert [Z] at (count) of [answer v]\\nend\\nif <key [0 v] pressed?> then\\nchange [count v] by (1)\\ninsert [0] at (count) of [answer v]\\nend\\nif <key [1 v] pressed?> then\\nchange [count v] by (1)\\ninsert [1] at (count) of [answer v]\\nend\\nif <key [2 v] pressed?> then\\nchange [count v] by (1)\\ninsert [2] at (count) of [answer v]\\nend\\nif <key [3 v] pressed?> then\\nchange [count v] by (1)\\ninsert [3] at (count) of [answer v]\\nend\\nif <key [4 v] pressed?> then\\nchange [count v] by (1)\\ninsert [4] at (count) of [answer v]\\nend\\nif <key [5 v] pressed?> then\\nchange [count v] by (1)\\ninsert [5] at (count) of [answer v]\\nend\\nif <key [6 v] pressed?> then\\nchange [count v] by (1)\\ninsert [6] at (count) of [answer v]\\nend\\nif <key [7 v] pressed?> then\\nchange [count v] by (1)\\ninsert [7] at (count) of [answer v]\\nend\\nif <key [8 v] pressed?> then\\nchange [count v] by (1)\\ninsert [8] at (count) of [answer v]\\nend\\nif <key [9 v] pressed?> then\\nchange [count v] by (1)\\ninsert [9] at (count) of [answer v]\\nend\\nif <key [right arrow v] pressed?> then\\nchange [count v] by (1)\\nend\\nif <key [left arrow v] pressed?> then\\nchange [count v] by (-1)\\nend\\nif <key [space v] pressed?> then\\nchange [count v] by (1)\\ninsert [] at (count) of [answer v]\\nend\\nwait (0.001) secs\\nend'),\n",
" ('(distance to [sprite v])',\n",
" '([sqrt v] of (((([x position v] of [wanted sprite v]) - (x position)) * (([x position v] of [wanted sprite v]) - (x position))) + ((([y position v] of [wanted sprite v]) - (y position)) * (([y position v] of [wanted sprite v]) - (y position)))))'),\n",
" ('(mouse x)',\n",
" '\\nforever\\n go to [mouse-pointer v]\\n set [Mouse Position v] to (x position)\\n'),\n",
" ('(mouse y)',\n",
" '\\nforever\\n go to [mouse-pointer v]\\n set [Mouse Position v] to (y position)\\n'),\n",
" ('(days since 2000)',\n",
" 'set [d v] to ((((367) * (year)) - ([floor v] of (((7) * ((year) + ([floor v] of (((month) + (9)) / (12))))) / (4)))) + ((([floor v] of (((275) * (month)) / (9))) + (day)) - (730530)))\\nif <(d) < [-36435]> then\\n change [d v] by (1)\\nend\\nif <(d) < [-72990]> then\\n change [d v] by (1)\\nend\\nif <(d) > [36585]> then\\n change [d v] by (-1)\\nend\\nchange [d v] by (-1)\\n'),\n",
" ('<sensor [A connected? v]',\n",
" '<([resistance A v] sensor value) < [10]>//resistance A through D'),\n",
" ('(variable)', '([public variable v] of [Stage v])'),\n",
" ('(variable)', '([personal variable v] of [Sprite1 v])'),\n",
" ('set [ v] to []', 'change [variable v] by (((variable) * (-1)) + (amount))'),\n",
" ('change [ v] by ()', 'set [variable v] to ((variable) + (amount))'),\n",
" ('(list::list)',\n",
" 'set [count v] to [0]\\nset [all are 1 v] to [true]\\nrepeat until <<(all are 1) = [false]> or <(count) > (length of [list v])>>\\nchange [count v] by (1)\\nif <(length of (item (count) of [list v])) > [1]> then\\nset [all are 1 v] to [false]\\nend\\nend\\nif <(all are 1) = [true]> then\\nset [report v] to []\\nset [count v] to [0]\\nrepeat (length of [list v])\\nchange [count v] by (1)\\nset [report v] to (join (report) (item (count) of [list v]))\\nend\\nelse\\nset [report v] to (item (1 v) of [list v])\\nset [count v] to [1]\\nrepeat ((length of [list v]) - (1))\\nchange [count v] by (1)\\nset [report v] to (join (report) (join [] (item (count) of [list v])))\\nend\\nend'),\n",
" ('replace item (0 v) of [ v] with []',\n",
" 'delete (position) of [List v]\\ninsert (item) at (position) of [List v]'),\n",
" ('([ v] contains [])',\n",
" 'set [report v] to [false]\\nset [count v] to [0]\\nrepeat (length of [list v])\\nchange [count v] by (1)\\nif <(item (count) of [list v]) = (thing)> then\\nset [report v] to [true]\\nstop [this script v]\\nend\\nend'),\n",
" ('(length of [list v])', '(length of (list))'),\n",
" ('add [] to [ v]', 'insert [thing] at (last v) of [List v]'),\n",
" ('start scene [scene1 v]::control', '\\nbroadcast [scene1 v]\\n'),\n",
" ('forever if <>::control', '\\nforever\\nif <. . .> then\\n. . .\\nend\\n'),\n",
" ('create clone::control', 'create clone of [myself v]'),\n",
" ('change costume by (1)::looks', 'switch costume to ((costume #) + (1))'),\n",
" ('change background by (1)::looks',\n",
" 'switch backdrop to ((backdrop #) + (1))'),\n",
" ('say nothing::looks', 'say []'),\n",
" ('say nothing::looks', 'think []'),\n",
" ('hide all sprites::looks', 'broadcast [hide all sprites v]'),\n",
" ('hide all sprites::looks',\n",
" '\\nwhen I receive [hide all sprites v] // put this in every sprite\\nhide\\n'),\n",
" ('stamp transparent (50)::pen',\n",
" '\\nset [ghost v] effect to (...)\\nstamp\\nset [ghost v] effect to (0)\\n'),\n",
" ('(abs ()::operators)', '([abs v] of ())'),\n",
" ('(sqrt ()::operators)', '([sqrt v] of ())'),\n",
" ('<loud?::sensing>', '<(loudness) > [30]>'),\n",
" ('(Scratch days::sensing)', '((days since 2000) - (2692))'),\n",
" ('(user id::sensing)',\n",
" 'when gf clicked\\nif <not <[☁ users v] contains (username)>> then\\n add (username) to [☁ users v]\\nend\\nrepeat until <(item (check user id) of [☁ users v]) = (username)>\\n change [check user id v] by (1)\\nend\\n'),\n",
" ('(user id::sensing)', 'say (join [Your User ID is ] (check user id))'),\n",
" ('(user id::sensing)',\n",
" '\\nif <(check user id) = [insert User ID number you want here]> then\\n . . .\\nend\\n'),\n",
" ('(camera motion::sensing)', '(video [motion v] on [this sprite v])'),\n",
" ('(camera direction::sensing)', '(video [direction v] on [this sprite v])'),\n",
" ('(counter::control)', '(counter) // Using a variable'),\n",
" ('incr counter::control', 'change [counter v] by (1)'),\n",
" ('clear counter::control', 'set [counter v] to [0]'),\n",
" ('while <> {} :: control', '\\nrepeat until <not <. . .>>\\n. . .\\nend\\n'),\n",
" ('for each [v v] in (10) {} :: control',\n",
" '\\nset [i v] to [0]\\nrepeat (...)\\nchange [i v] by (1)\\n. . .\\nend\\n'),\n",
" ('<[ v] received?::events>',\n",
" '\\nwhen I receive [something v]\\nset [something received v] to [true]\\n. . .\\nset [something received v] to [false]\\n'),\n",
" ('<[ v] received?::events>',\n",
" '\\nwhen I receive [something v]\\nset [something received v] to [true]\\nwait (0.5) secs\\nset [something received v] to [false]\\n'),\n",
" ('<[ v] received?::events>',\n",
" '\\nif <(something received) = [true]> then\\n. . .\\n'),\n",
" ('<[ v] received?::events>',\n",
" '\\nwhen gf clicked\\nset [something received v] to [false]\\n\\nwhen I receive [something v]\\nset [something received v] to [true]\\n'),\n",
" ('<[ v] received?::events>', '\\n<(something received) = [true]>\\n'),\n",
" ('<[ v] received?::events>',\n",
" '\\nwhen I receive [EVERYOTHERBROADCAST (duplicate and replace) v]\\nset [something received v] to [false]\\n'),\n",
" ('stop [all and press green flag v]', 'broadcast [Scratch-StartClicked v]'),\n",
" ('<clone?::control>',\n",
" '\\nwhen I start as a clone\\nset [clone? v] to [true] // create a variable for this sprite only, non-clones are set to false\\n'),\n",
" ('<clone?::control>',\n",
" '\\nset [clone? v] to [true]\\ncreate clone of [myself v]\\nset [clone? v] to [false]\\n'),\n",
" ('change by x: () y: ()::motion',\n",
" 'go to x: ((x position) + (X)) y: ((y position) + (Y))'),\n",
" ('change by x: () y: ()::motion', '\\nchange x by (X)\\nchange y by (Y)\\n'),\n",
" ('glide () secs by x: () y: ()::motion',\n",
" 'glide (seconds) secs to x: ((x position) + (X)) y: ((y position) + (Y))'),\n",
" ('glide () secs () steps::motion',\n",
" 'glide (seconds) secs to x: ((x position) + (([sin v] of (direction)) * (steps))) y: ((y position) + (([cos v] of (direction)) * (steps)))'),\n",
" ('point towards x: () y: ()::motion',\n",
" 'point in direction (([atan v] of (((X) - (x position)) / ((Y) - (y position)))) + (<(y position) > (Y)> * (180)))'),\n",
" ('(distance to x: () y: ()::sensing)',\n",
" '([sqrt v] of ((((x position) - (wanted x)) * ((x position) - (wanted x))) + (((y position) - (wanted y)) * ((y position) - (wanted y)))))'),\n",
" ('<ask in progress?::sensing>',\n",
" '\\nset [ask in progress? v] to [true]\\nask [...] and wait\\nset [ask in progress? v] to [false]\\n'),\n",
" ('<sprite clicked?::sensing>',\n",
" '\\nwhen this sprite clicked\\nset [sprite clicked? v] to [true]\\nwait until <not <<mouse down?> and <touching [mouse-pointer v]?>>>\\nset [sprite clicked? v] to [false]\\n'),\n",
" ('show all sprites::looks', 'broadcast [show all sprites v]'),\n",
" ('show all sprites::looks',\n",
" '\\nwhen I receive [show all sprites v] // put this in every sprite\\nshow\\n'),\n",
" ('previous costume::looks', 'switch costume to ((costume #) - (1))'),\n",
" ('previous backdrop::looks', 'switch backdrop to ((backdrop #) - (1))'),\n",
" ('previous backdrop::looks', 'switch backdrop to [previous backdrop v]'),\n",
" ('(costume name::looks)', '([costume name v] of [wanted sprite v])'),\n",
" ('go to back::looks', 'go back ([10 ^ v] of (309)) layers'),\n",
" ('go to back::looks',\n",
" '\\nwhen green flag clicked\\nchange [sprites v] by (1)\\n'),\n",
" ('go to back::looks', 'go back ((sprites)- (1)) layers'),\n",
" ('(() ^ ():: operators)', '([10 ^ v] of ((power) * ([log v] of (base))))\\n'),\n",
" ('(() ^ ():: operators)', '\\n([e ^ v] of ((power) * ([ln v] of (base))))\\n'),\n",
" ('<true::operators>', '<not <>> // Put no boolean in the not block.'),\n",
" ('<true::operators>', '<[0] = [0]> // Same input on both slots.'),\n",
" ('<false::operators>',\n",
" '<not <not <>>> // Put no boolean in the second not block.'),\n",
" ('<false::operators>', '<<> and <>> // Put no booleans in the and block.'),\n",
" ('<false::operators>', '<<> or <>> // Put no booleans in the or block.'),\n",
" ('<false::operators>', '<[0] = [1]>'),\n",
" ('<[] ≠ []::operators>', '<not <[] = []>>'),\n",
" ('<[] ≥ []::operators>', '<not <[] < []>>'),\n",
" ('<[] ≥ []::operators>',\n",
" '<<(input 1) > (input 2)> or <(input 1) = (input 2)>>'),\n",
" ('<[] ≤ []::operators>', '<not <[] > []>>'),\n",
" ('<[] ≤ []::operators>',\n",
" '<<(input 1) < (input 2)> or <(input 1) = (input 2)>>'),\n",
" ('(if <> then [] else []::operators)',\n",
" '\\nif <condition::grey> then\\nset [report v] to (true)\\nelse\\nset [report v] to (false)\\n'),\n",
" ('(if <> then [] else []::operators)',\n",
" '(((true) * <condition::grey>) + ((false) * <not <condition::grey>>))'),\n",
" ('(letters () through () of []::operators)',\n",
" 'set [report v] to []\\nset [count v] to (a) // a is the first letter\\nrepeat until <(count) = ((b) + (1))> // b is the last letter\\nset [report v] to (join (report) (letter (count) of (text)))\\nchange [count v] by (1)\\nend\\n'),\n",
" ('(digit () of ()::operators)',\n",
" '(([floor v] of ((number) / ([10 ^ v] of (([floor v] of (digit)) - (1))))) mod (10))'),\n",
" ('(round () to the nearest ()::operators)',\n",
" '((round ((round what) / (to the nearest))) * (to the nearest))'),\n",
" ('(round () to the nearest ()::operators)',\n",
" '((round ((number) * ([10 ^ v] of (number of places)))) / ([10 ^ v] of (number of places)))'),\n",
" ('([ v] effect::looks)', '\\nforever\\nset [color v] effect to (effect)\\n'),\n",
" ('<sound [ v] playing?::sound>',\n",
" '\\nset [playing v] to [true]\\nplay sound [wanted sound v] until done\\nset [playing v] to [false]\\n'),\n",
" ('play sound [ v] for (1) beats::sound',\n",
" '\\nplay sound [wanted sound v]\\nrest for (1) beats\\nstop all sounds\\n'),\n",
" ('(instrument::sound)', '\\nforever\\nset instrument to (instrument)\\n'),\n",
" ('change item (1 v) of [ v] by (1)::list',\n",
" 'replace item (1 v) of [wanted list v] with ((item (1 v) of [wanted list v]) + (1))')]"
]
},
"execution_count": 45,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"out"
]
},
{
"cell_type": "code",
"execution_count": 47,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[[\"when green flag clicked\", \"\\nwhen I receive [Scratch-StartClicked v]\\n. . .\\n\"], [\"when green flag clicked\", \"\\nwhen [timer v] > (-1) // This is a block that can not be stopped\\nif <<((mouse y) = [180]) and <mouse down?>> or <(clicked) = [0]>> then\\nset [clicked v] to [1]\\n. . .\\n\"], [\"when [space v] key pressed\", \"when [timer v] > (-1) // This is a block that can not be stopped, therefore you can make a workaround that does not require the green flag to be clicked\\nforever\\nwait until <key [space v] pressed?>\\n. . .\"], [\"when this sprite clicked\", \"\\nwhen [timer v] > (-1) // This is a block that can not be stopped, therefore you can make a workaround that does not require the green flag to be clicked\\nforever\\n wait until <<touching [mouse-pointer v]?> and <mouse down?>> //This is not an exact workaround, because you could, first, while not touching the Sprite, hold down your mouse, then, still holding down your mouse, move it over to the sprite. This will not activate the true block but will activate this.\\n\\n . . .\\n\"], [\"when this sprite clicked\", \"\\nwhen [timer v] > (-1) // This is a block that can not be stopped, therefore you can make a workaround that does not require the green flag to be clicked\\nforever\\nif <<mouse down> and <not<touching [mouse pointer v]>>> then\\nset [down? v] to [1]\\nwait until <not<mouse down>>\\nset [down? v] to [0]\\nend\\nend // This makes sure the script will not activate if you are holding down the mouse and then move it onto the sprite.\\n\\nwhen [timer v] > (-1) // This is a block that can not be stopped, therefore you can make a workaround that does not require the green flag to be clicked\\nforever\\nif <<touching [mouse pointer v]> and <<mouse down> and <(down) = [0]>>> then\\n. . .\\nend\\n\"], [\"when [loudness v] > (10)\", \"\\nwhen gf clicked // You can not use the greater than block to work around the green flag, because the greater than block is the block you want to work around\\nforever\\n wait until <(loudness) > (10)>\\n . . .\\n\"], [\"broadcast [message v]\", \"\\nwhen gf clicked\\nset [broadcasted? v] to [0]\\n. . .\\nset [broadcasted? v] to [1]\\n\\nwhen gf clicked\\nforever\\nwait until <(broadcasted?) = [1]>\\n. . .\\nset [broadcasted? v] to [0]\\nend\\n\"], [\"broadcast [message v]\", \"\\nbroadcast [broadcast v] and wait\\nwhen I receive [broadcast v]\\n. . . // whatever comes after the broadcast, in addition to the receive block you would have\\n\"], [\"broadcast [message v] and wait\", \"\\nwhen gf clicked\\nset [broadcasted? v] to [0]\\nset [wait v] to [0]\\n. . .\\nset [broadcasted? v] to [1]\\nset [wait v] to [1]\\nwait until <(wait) = [0]>\\n. . .\\n\\nwhen gf clicked\\nforever\\nwait until <(broadcasted?) = [1]>\\n. . .\\nset [broadcasted? v] to [0]\\nset [wait v] to [0]\\nend\\n\"], [\"broadcast [message v] and wait\", \"\\nset [wait v] to [3] // however many receive blocks you have for that particular broadcast\\nbroadcast [broadcast v]\\nwhen I receive [broadcast v]\\n. . .\\nchange [wait v] by (-1) // be sure to but this right before any \\\"stop script\\\" blocks, too!\\n\"], [\"wait (1) secs\", \"\\nrest for (((tempo) / (60)) * (1)) beats\\n\"], [\"wait (1) secs\", \"\\nreset timer\\nrepeat until <not <(timer) < [1]>>\\n// Put no blocks here.\\nend\\n// If you are using other scripts that involve the timer, this might mess them up\"], [\"forever\", \"repeat until <> // Put no boolean in the block or put a boolean that will always equals false (1=2).\\n. . .\\nend\"], [\"forever\", \"\\nrepeat ([10 ^ v] of (309)\\n. . .\\n\"], [\"repeat (10)\", \"\\nset [counter v] to [0]\\nrepeat until <(counter) = [10]>\\nchange [counter v] by (1)\\n. . .\\nend\\n\"], [\"repeat until <>\", \"\\ndefine loop\\nif <not <. . .>> then\\n. . .\\nloop\\nend\\n\"], [\"repeat until <>\", \"\\nbroadcast [loop v]\\n\\nwhen I receive [loop v]\\nif <not <. . .>> then\\n. . .\\nbroadcast [loop v]\\nend\\n\"], [\"if <> then\", \"\\nif <. . .> then\\n. . .\\nelse\\n// Put no blocks here.\\nend\\n\"], [\"if <> then\", \"\\nbroadcast <. . .> and wait\\n\\nwhen I receive [true v]\\n. . .\\n\"], [\"if <> then\", \"\\nwhen gf clicked\\nforever\\nwait until <. . .>\\n. . .\\n// That assumes a forever loop around the if\\n\"], [\"if <> then\\nelse\", \"\\nif <> then\\n. . .\\nend\\nif <not <>> then\\n. . .\\nend\\n\"], [\"if <> then\\nelse\", \"\\ndefine if <boolean>\\nif <boolean> then\\n. . . // whatever would be in if\\nstop [this script v]\\nend\\nwhen gf clicked\\n. . .\\nif <. . .> then\\n. . .//whatever would be in else\\n//that assumes the if/else is the last block\\n\"], [\"wait until <>\", \"repeat until < . . . >\\n// Put no blocks here.\\nend\\n\"], [\"stop [this script v]\", \"\\nwait until <> // Put no boolean in the block.\\n\"], [\"stop [this script v]\", \"wait ([10 ^ v] of (309)) secs // These do not actually *stop* the script, the blocks only start and don't end\\n\"], [\"stop [this script v]\", \"\\nforever\\n// Put no blocks here.\\n\"], [\"stop [all v]\", \"\\nwhen I receive [stop all v]\\nstop [other scripts in sprite v]\\n// It must be put in every Sprite and the Stage.\\n\"], [\"(direction)\", \"([direction v] of [wanted sprite v])\"], [\"(x position)\", \"([x position v] of [wanted sprite v])\"], [\"(y position)\", \"([y position v] of [wanted sprite v])\"], [\"go to [mouse-pointer v]\", \"go to x: (mouse x) y: (mouse y)\"], [\"go to [wanted sprite v]\", \"go to x: ([x position v] of [wanted sprite v]) y: ([y position v] of [wanted sprite v])\"], [\"go to [wanted sprite v]\", \"set x to: ([x position v] of [wanted sprite v])\\nset y to: ([y position v] of [wanted sprite v])\\n\"], [\"go to x: () y: ()\", \"set x to (x value)\\nset y to (y value)\"], [\"go to x: () y: ()\", \"glide (0) secs to x: () y: ()\"], [\"point towards [ v]\", \"\\nset [delta_x v] to (([x position v] of [wanted sprite v]) - (x position))\\nset [delta_y v] to (([y position v] of [wanted sprite v]) - (y position))\\nif<(delta_y) = [0]> then\\nif<(delta_x) < [0]> then\\npoint in direction (-90 v)\\nelse\\npoint in direction (90 v)\\nend\\nelse\\nif<(delta_y) < [0]> then\\npoint in direction ((180) + ([atan v] of ((delta_x) / (delta_y))))\\nelse\\npoint in direction ([atan v] of ((delta_x) / (delta_y)))\\nend\\nend\\n\"], [\"point in direction (90 v)\", \"\\nturn cw ((90) - (direction)) degrees\\n\"], [\"point in direction (90 v)\", \"\\nturn ccw ((-1) * ((90) - (direction))) degrees\\n\"], [\"turn right (15) degrees\", \"\\npoint in direction ((direction) + (15))\\n\"], [\"turn left (15) degrees\", \"\\npoint in direction ((direction) - (15))\\n\"], [\"move (10) steps\", \"\\ngo to x: ((x position) + (([sin v] of (direction)) * (10))) y: ((y position) + (([cos v] of (direction)) * (10)))\\n\"], [\"move (10) steps\", \"\\nchange x by (([sin v] of (direction)) * (10))\\nchange y by (([cos v] of (direction)) * (10))\\n\"], [\"change x by (10)\", \"set x to ((x position) + (10))\"], [\"change y by (10)\", \"set y to ((y position) + (10))\"], [\"set x to (0)\", \"change x by ((wanted x) - (x position))\"], [\"set x to (0)\", \"change x by (((x position) * (-1)) + (wanted x))\"], [\"set x to (0)\", \"go to x: (wanted x) y: (y position)\"], [\"set y to (0)\", \"change y by ((wanted y) - (y position))\"], [\"set y to (0)\", \"change y by (((y position) * (-1)) + (wanted y))\"], [\"set y to (0)\", \"go to x: (x position) y: (wanted y)\"], [\"turn motor on for (1) secs::extension\", \"motor on::extension\\nwait (number) secs\\nmotor off::extension\"], [\"motor off::extension\", \"turn motor on for (0) secs::extension\"], [\"motor off::extension\", \"set motor power (0)::extension\"], [\"switch costume to [ v]\", \"\\nrepeat until <(wanted costume #) = (costume #)>\\nnext costume\\nend\\n\"], [\"next costume\", \"switch costume to ((costume #) + (1))\"], [\"switch backdrop to [ v]\", \"\\nrepeat until <(wanted backdrop #) = (backdrop #)>\\nnext backdrop\\nend\\n\"], [\"next backdrop\", \"switch backdrop to ((backdrop #) + (1))\"], [\"next backdrop\", \"switch backdrop to [next backdrop v]\"], [\"(costume #)\", \"([costume # v] of [wanted sprite v])\"], [\"(backdrop #)\", \"([backdrop # v] of [Stage v])\"], [\"(backdrop name)\", \"([backdrop name v] of [Stage v])\"], [\"say [] for () secs\", \"\\nsay (text)\\nwait (amount) secs\\nsay []\\n\"], [\"think [] for () secs\", \"\\nthink (text)\\nwait (amount) secs\\nthink []\\n\"], [\"clear graphic effects\", \"\\nset [color v] effect to (0)\\nset [fisheye v] effect to (0)\\nset [whirl v] effect to (0)\\nset [pixelate v] effect to (0)\\nset [mosaic v] effect to (0)\\nset [brightness v] effect to (0)\\nset [ghost v] effect to (0)\\n\"], [\"(size)\", \"\\n([size v] of [wanted sprite v])\\n\"], [\"change size by ()\", \"\\nset size to ((size) + (amount))%\\n\"], [\"set size to () %\", \"\\nchange size by ((wanted size) - (size))\\n\"], [\"go to front\", \"\\ngo back ((-1) * ([10 ^ v] of (309))) layers\\n\"], [\"hide\", \"set [ghost v] effect to (100)\"], [\"hide\", \"switch costume to [invisible costume v] \"], [\"play sound [ v]\", \"\\n. . .\\nbroadcast [continue script v]\\nplay sound [wanted sound v] until done\\n\\nwhen I receive [continue script v]\\n. . .\\n\"], [\"play sound [ v] until done\", \"play sound [wanted sound v]\\nwait (length of sound) secs\"], [\"rest for () beats\", \" wait (((60) / (tempo)) * (beats)) secs\"], [\"change volume by ()\", \"set volume to ((volume) + (amount))%\"], [\"set volume to () %\", \"change volume by ((amount) - (volume))\"], [\"(volume)\", \"([volume v] of [wanted sprite v])\"], [\"change tempo by ()\", \"set tempo to ((tempo) + (amount)) bpm\"], [\"set tempo to () bpm\", \"change tempo by ((amount) - (tempo))\"], [\"(() + ())\", \"((a) - ((b) * (-1)))\"], [\"(() + ())\", \"((a) - ((0) - (b)))\"], [\"(() + ())\", \"\\nset [answer v] to (a)\\nchange [answer v] by (b)\\n\"], [\"(() - ())\", \"((a) + ((b) * (-1)))\"], [\"(() - ())\", \"((a) + ((b) / (-1)))\"], [\"(() - ())\", \"((a) + (join [-](b)))\"], [\"(() - ())\", \"\\nset [answer v] to ()\\nchange [answer v] by ((-1) * ())\\n\"], [\"(() * ())\", \"delete (all v) of [num1 numbers v] //setup\\ndelete (all v) of [num2 numbers v]\\ndelete (all v) of [product digits v]\\nset [product v] to [0]\\nset [dec pos 1 v] to [0]\\nset [dec pos 2 v] to [0]\\nif <(answer) < [0]> then\\nset [count v] to [1]\\nset [no 1 negative v] to [y]\\nelse\\nset [count v] to [0]\\nset [no 1 negative v] to [n]\\nend\\nrepeat (length of ())\\nchange [count v] by (1)\\nif <not <(letter (count) of ()) = [.]>> then\\nadd (letter (count) of ()) to [num1 numbers v]\\nelse\\nset [dec pos 1 v] to ((length of (answer)) - (count))\\nend\\nend\\nif <() < [0]> then\\nset [count v] to [1]\\nset [no 2 negative v] to [y]\\nelse\\nset [count v] to [0]\\nset [no 2 negative v] to [n]\\nend\\nrepeat (length of ())\\nchange [count v] by (1)\\nif <not <(letter (count) of ()) = [.]>> then\\nadd (letter (count) of ()) to [num2 numbers v]\\nelse\\nset [dec pos 2 v] to ((length of (answer)) - (count))\\nend\\nend\\nset [num1 v] to (num1 numbers)\\nset [num2 v] to (num2 numbers)\\nrepeat (num1) //start\\nchange [product v] by (num2)\\nend\\nset [decimal position v] to ((dec pos 1) + (dec pos 2))\\nset [count v] to [0]\\nrepeat (length of (product))\\nchange [count v] by (1)\\nadd (letter (count) of (product)) to [product digits v]\\nend\\nif <not <(decimal position) = [0]>> then\\ninsert [.] at ((length of [product digits v]) - ((decimal position) - (1))) of [product digits v]\\nend\\nif <<<(no 1 negative) = [y]> or <(no 2 negative) = [y]>> and <not <<(no 1 negative) = [y]> and <(no 2 negative) = [y]>>>> then\\ninsert [-] at (1 v) of [product digits v]\\nend\\nset [product v] to (product digits)\"], [\"(() * ())\", \"((a) / ((1) / (b))) // the product of \\\"a\\\" and \\\"b\\\" \"], [\"(() * ())\", \"\\nif <(a) < [0]> then\\nrepeat ([abs v] of (a))\\nchange [product v] by ((0) - (b))\\nend\\nelse\\nset [product v] to [0]\\nrepeat (a)\\nchange [product v] by (b)\\nend\\nend\\n\"], [\"(() / ())\", \"\\ndelete (all v) of [dividend digits v]\\ndelete (all v) of [quotient v]\\nset [divident dev v] to [0]\\nset [dividend v] to ()\\nset [divisor v] to ([abs v] of ())\\nset [no2 neg v] to <() < [0] >\\nif <(dividend) < [0] > then\\n set [count v] to [1]\\nelse\\n set [count v] to [0]\\nend\\nset [no1 neg v] to <(dividend) < [0] >\\nrepeat (length of (dividend))\\n change [count v] by (1)\\n if <(letter (count) of (dividend)) = [.]> then\\n set [dividend dec v] to ((length of (dividend)) - (count))\\n else\\n add (letter (count) of (dividend)) to [dividend digits v]\\n end\\nend\\nrepeat ((10) - (dividend dec))\\n add [0] to [dividend digits v]\\nend\\nif <(round (divisor)) = (divisor)> then\\n set [dec pos v] to [0]\\nelse\\n set [count v] to [0]\\n repeat until <(letter (count) of (dividend)) = [.]>\\n change [count v] by (1)\\n end\\n set [dec pos v] to ((length of (divisor)) - (count))\\n set [dividend v] to ((dividend) * ([10 ^ v] of (dec pos)))\\n set [divisor v] to (round ((divisor) * ([10 ^ v] of (dec pos))))\\nend\\nset [count v] to [0]\\nset [currently solving v] to [] //That's an empty input, not a space.\\nrepeat (length of [dividend digits v])\\n change [count v] by (1)\\n set [currently solving v] to (join (currently solving) (item (count) of [dividend digits v]))\\n set [times v] to [9]\\n repeat until <((divisor) * (times)) < ((currently solving) + (1))>\\n change [times v] by (-1)\\n add [times v] to [quotient v]\\n set [currently solving v] to ((currently solving) - ((divisor) * (times)))\\nend\\ninsert [.] at ((length of [quotient v]) - (8)) of [quotient v]\\nrepeat until <not <<(item (last v) of [quotient v]) = [.]> or <<<(item (last v) of [quotient v]) = [0]> and <(round (quotient)) = (quotient)>> and <[quotient v] contains [.]>>>>\\n delete (last v) of [quotient v]\\nrepeat until <<not <(item (1 v) of [quotient v]) = [0]>> or <(item (2 v) of [quotient v]) = [.]>>\\n delete (1 v) of [quotient v]\\n\"], [\"(() / ())\", \"\\nif <(b) < (0)> then\\n set [result v] to (((a) * ([e ^ v] of ((-1) * ([ln v] of ((-1) * (b)))))) * (-1))\\nelse\\n set [result v] to ((a) * ([e ^ v] of ((-1) * ([ln v] of (b)))))\\nend\\n\"], [\"([] > [])\", \"\\n<<not <(a) < (b)>> and <not <(a) = (b)>>>\\n\"], [\"([] < [])\", \"\\n<<not <(a) > (b)>> and <not <(a) = (b)>>>\\n\"], [\"([] = [])\", \"\\n<<not <(a) < (b)>> and <not <(a) > (b)>>>\\n\"], [\"([] = [])\", \"\\ndelete (all v) of [list v] //case sensitive\\nadd (a) to [list v]\\nif <[list v] contains (b)> then\\n . . .\\nend\\n\"], [\"<<> and <>>\", \"\\nif <. . .> then\\nif <. . .> then\\n. . .\\nend\\nend\\n\"], [\"<<> and <>>\", \"\\n<not <<not <. . .>> or <not <. . .>>>>\\n\"], [\"<<> and <>>\", \"\\nset [var v] to [0]\\nrepeat until <(var) = [1]>\\n. . . // your block here, C-blocks loop inside\\nif <> then\\nset [var v] to [1]\\nend // this works for all current boolean-accepting blocks\\n\"], [\"<<> and <>>\", \"\\nif <> then\\nif <> then\\nset [return v] to [true]\\nelse\\nset [return v] to [false]\\nend\\nelse\\nset [return v] to [false]\\n\"], [\"<<> or <>>\", \"\\nif <. . .> then\\n. . .\\nelse\\nif <. . .> then\\n. . .\\nend\\nend\\n\"], [\"<<> or <>>\", \"\\n<not <<not <. . .>> and <not <. . .>>>>\\n\"], [\"<<> or <>>\", \"\\nif <> then\\nset [return v] to [true]\\nelse\\nif <> then\\nset [return v] to [true]\\nelse\\nset [return v] to [false\\n\"], [\"<not <>>\", \"<(. . .) = [false]>\"], [\"<not <>>\", \"\\nif <> then\\n//Put no blocks here.\\nelse\\n. . .\\n\"], [\"(join [][])\", \"set [count v] to [0]\\nset [final v] to []\\nrepeat (length of (a)) // a is the first input\\nchange [count v] by (1)\\nadd (letter (count) of (a)) to [final v]\\nend\\nset [count v] to (0)\\nrepeat (length of (b)) // b is the second input\\nchange [count v] by (1)\\nadd (letter (count) of (b)) to [final v]\\nend\\nset [final v] to (final) // This is the final string\\n\"], [\"(join [][])\", \"\\n// this only works if they're both whole numbers and b is positive\\nset [return v] to []\\nrepeat (length of ())\\nset [return v] to ((return) * (10))\\nend\\nchange [return v] by ()\\n\"], [\"(letter (1) of [])\", \"// Only works for whole numbers and the letter you're looking for must be 1\\nif <[] > [0]> then\\nset [return v] to []\\nrepeat ((length of ()) - (1))\\nset [return v] to ([floor v] of ((return) / (10)))\\nend\\nelse\\nset [return v] to [-]\\nend\\n// all that's needed is a way to cut off the front digits.\\n\"], [\"(length of ())\", \"set [return v] to [1]\\nrepeat until <(letter ((return) + (1)) of ()) = []>\\nchange [return v] by (1)\\nend\"], [\"(() mod ())\", \"\\nif <(round ((a) / (b))) > ((a) / (b))> then\\nset [remainder v] to ((a) - ((round (((a) / (b)) - (0.5))) * (b)))\\nelse\\nset [remainder v] to ((a) - ((round ((a) / (b))) * (b)))\\nend\\n\"], [\"(round ())\", \"set [report v] to []\\nset [count v] to [1]\\nrepeat until <<(letter (count) of (num)) = [.]> or <(count) = (length of (num))>>\\nset [report v] to (join (report) (letter (count) of (num)))\\nchange [count v] by (1)\\nend\\nif <<(letter (count) of (num)) = [.]> and <(letter ((count) + (1)) of (num)) > (4)>> then\\nchange [report v] by (1)\\nend\"], [\"(round ())\", \"set [return v] to [0]\\nset [b v] to []\\nrepeat until <([abs v] of (b)) < (1)>\\nif <[] < [0]> then\\nchange [return v] by (1)\\nchange [b v] by (-1)\\nelse\\nchange [return v] by (-1)\\nchange [b v] by (1)\\nend\\nend\"], [\"(round ())\", \"\\ndefine round (#)\\nset [count v] to [1]\\nrepeat until <(letter (count) of (#))=[.]\\nchange [count v] by [1]\\nend\\nchange [count v] by [1]\\nif <(letter (count) of (#))=[5]> then\\nset [round v] to ([ceiling v] of (#))\\nelse\\nif <(letter (count) of (#))>[5]> then\\nset [round v] to ([ceiling v] of (#))\\nelse\\nif <(letter (count) of (#))<[5]> then\\nset [round v] to ([floor v] of (#)\\nend\\nend\\nend\\n\"], [\"([10 ^ v] of ())\", \"\\nset [output v] to (number)\\nif<(output) < (0)> then\\nset [output v] to ((-1) * (output))\\nend\\n\"], [\"([10 ^ v] of ())\", \"\\nset [output v] to (([sqrt v] of ((input) * (input))) + (0))\\n\"], [\"([10 ^ v] of ())\", \"\\nset [output v] to (input)\\nrepeat until <(output) = (input)>\\nset [output v] to ((((output) * (output)) + (input)) / ((2) * (output)))\\nend\\n\"], [\"([10 ^ v] of ())\", \"\\nset [output v] to ([e ^ v] of ((0.5) * ([ln v] of (input))))\\n\"], [\"([10 ^ v] of ())\", \"\\nset [output v] to (([log v] of (input)) / ([log v] of ([e ^ v] of (1))))\\n\"], [\"([10 ^ v] of ())\", \"\\nset [output v] to ([10 ^ v] of ((input) * (2.718281828459)))\\n\"], [\"([10 ^ v] of ())\", \"\\nset [output v] to (([ln v] of (input)) / ([ln v] of (10)))\\n\"], [\"([10 ^ v] of ())\", \"\\nset [output v] to ([e ^ v] of ((input) * ([ln v] of (10))))\\n\"], [\"([10 ^ v] of ())\", \"\\nset [output v] to (round ((input) - (.5)))\\n\"], [\"([10 ^ v] of ())\", \"\\nset [output v] to (round ((input) + (.49999999)))\\n\"], [\"([10 ^ v] of ())\", \"\\nset [output v] to ([cos v] of ((90) - (input)))\\n\"], [\"([10 ^ v] of ())\", \"\\nset [output v] to ([sin v] of ((90) - (input)))\\n\"], [\"([10 ^ v] of ())\", \"\\nset [output v] to (([sin v] of (input)) / ([cos v] of (input)))\\n\"], [\"stamp\", \"\\nset [stamping? v] to [true]\\ncreate clone of [myself v]\\nset [stamping? v] to [false]\\n\\nwhen I start as a clone // and any other hat blocks\\nif <(stamping?) = [true]> then\\nstop [this script v]\\nend\\n\"], [\"ask [] and wait\", \"say (question)\\ndelete (all v) of [answer v]\\nset [count v] to [0]\\nrepeat until <<touching [mouse-pointer v]?> and <mouse down?>>\\nif <key [a v] pressed?> then\\nchange [count v] by (1)\\ninsert [A] at (count) of [answer v]\\nend\\nif <key [b v] pressed?> then\\nchange [count v] by (1)\\ninsert [B] at (count) of [answer v]\\nend\\nif <key [c v] pressed?> then\\nchange [count v] by (1)\\ninsert [C] at (count) of [answer v]\\nend\\nif <key [d v] pressed?> then\\nchange [count v] by (1)\\ninsert [D] at (count) of [answer v]\\nend\\nif <key [e v] pressed?> then\\nchange [count v] by (1)\\ninsert [E] at (count) of [answer v]\\nend\\nif <key [f v] pressed?> then\\nchange [count v] by (1)\\ninsert [F] at (count) of [answer v]\\nend\\nif <key [g v] pressed?> then\\nchange [count v] by (1)\\ninsert [G] at (count) of [answer v]\\nend\\nif <key [h v] pressed?> then\\nchange [count v] by (1)\\ninsert [H] at (count) of [answer v]\\nend\\nif <key [i v] pressed?> then\\nchange [count v] by (1)\\ninsert [I] at (count) of [answer v]\\nend\\nif <key [j v] pressed?> then\\nchange [count v] by (1)\\ninsert [J] at (count) of [answer v]\\nend\\nif <key [k v] pressed?> then\\nchange [count v] by (1)\\ninsert [K] at (count) of [answer v]\\nend\\nif <key [l v] pressed?> then\\nchange [count v] by (1)\\ninsert [L] at (count) of [answer v]\\nend\\nif <key [m v] pressed?> then\\nchange [count v] by (1)\\ninsert [M] at (count) of [answer v]\\nend\\nif <key [n v] pressed?> then\\nchange [count v] by (1)\\ninsert [N] at (count) of [answer v]\\nend\\nif <key [o v] pressed?> then\\nchange [count v] by (1)\\ninsert [O] at (count) of [answer v]\\nend\\nif <key [p v] pressed?> then\\nchange [count v] by (1)\\ninsert [P] at (count) of [answer v]\\nend\\nif <key [q v] pressed?> then\\nchange [count v] by (1)\\ninsert [Q] at (count) of [answer v]\\nend\\nif <key [r v] pressed?> then\\nchange [count v] by (1)\\ninsert [R] at (count) of [answer v]\\nend\\nif <key [s v] pressed?> then\\nchange [count v] by (1)\\ninsert [S] at (count) of [answer v]\\nend\\nif <key [t v] pressed?> then\\nchange [count v] by (1)\\ninsert [T] at (count) of [answer v]\\nend\\nif <key [u v] pressed?> then\\nchange [count v] by (1)\\ninsert [U] at (count) of [answer v]\\nend\\nif <key [v v] pressed?> then\\nchange [count v] by (1)\\ninsert [V] at (count) of [answer v]\\nend\\nif <key [w v] pressed?> then\\nchange [count v] by (1)\\ninsert [W] at (count) of [answer v]\\nend\\nif <key [x v] pressed?> then\\nchange [count v] by (1)\\ninsert [X] at (count) of [answer v]\\nend\\nif <key [y v] pressed?> then\\nchange [count v] by (1)\\ninsert [Y] at (count) of [answer v]\\nend\\nif <key [z v] pressed?> then\\nchange [count v] by (1)\\ninsert [Z] at (count) of [answer v]\\nend\\nif <key [0 v] pressed?> then\\nchange [count v] by (1)\\ninsert [0] at (count) of [answer v]\\nend\\nif <key [1 v] pressed?> then\\nchange [count v] by (1)\\ninsert [1] at (count) of [answer v]\\nend\\nif <key [2 v] pressed?> then\\nchange [count v] by (1)\\ninsert [2] at (count) of [answer v]\\nend\\nif <key [3 v] pressed?> then\\nchange [count v] by (1)\\ninsert [3] at (count) of [answer v]\\nend\\nif <key [4 v] pressed?> then\\nchange [count v] by (1)\\ninsert [4] at (count) of [answer v]\\nend\\nif <key [5 v] pressed?> then\\nchange [count v] by (1)\\ninsert [5] at (count) of [answer v]\\nend\\nif <key [6 v] pressed?> then\\nchange [count v] by (1)\\ninsert [6] at (count) of [answer v]\\nend\\nif <key [7 v] pressed?> then\\nchange [count v] by (1)\\ninsert [7] at (count) of [answer v]\\nend\\nif <key [8 v] pressed?> then\\nchange [count v] by (1)\\ninsert [8] at (count) of [answer v]\\nend\\nif <key [9 v] pressed?> then\\nchange [count v] by (1)\\ninsert [9] at (count) of [answer v]\\nend\\nif <key [right arrow v] pressed?> then\\nchange [count v] by (1)\\nend\\nif <key [left arrow v] pressed?> then\\nchange [count v] by (-1)\\nend\\nif <key [space v] pressed?> then\\nchange [count v] by (1)\\ninsert [] at (count) of [answer v]\\nend\\nwait (0.001) secs\\nend\"], [\"(distance to [sprite v])\", \"([sqrt v] of (((([x position v] of [wanted sprite v]) - (x position)) * (([x position v] of [wanted sprite v]) - (x position))) + ((([y position v] of [wanted sprite v]) - (y position)) * (([y position v] of [wanted sprite v]) - (y position)))))\"], [\"(mouse x)\", \"\\nforever\\n go to [mouse-pointer v]\\n set [Mouse Position v] to (x position)\\n\"], [\"(mouse y)\", \"\\nforever\\n go to [mouse-pointer v]\\n set [Mouse Position v] to (y position)\\n\"], [\"(days since 2000)\", \"set [d v] to ((((367) * (year)) - ([floor v] of (((7) * ((year) + ([floor v] of (((month) + (9)) / (12))))) / (4)))) + ((([floor v] of (((275) * (month)) / (9))) + (day)) - (730530)))\\nif <(d) < [-36435]> then\\n change [d v] by (1)\\nend\\nif <(d) < [-72990]> then\\n change [d v] by (1)\\nend\\nif <(d) > [36585]> then\\n change [d v] by (-1)\\nend\\nchange [d v] by (-1)\\n\"], [\"<sensor [A connected? v]\", \"<([resistance A v] sensor value) < [10]>//resistance A through D\"], [\"(variable)\", \"([public variable v] of [Stage v])\"], [\"(variable)\", \"([personal variable v] of [Sprite1 v])\"], [\"set [ v] to []\", \"change [variable v] by (((variable) * (-1)) + (amount))\"], [\"change [ v] by ()\", \"set [variable v] to ((variable) + (amount))\"], [\"(list::list)\", \"set [count v] to [0]\\nset [all are 1 v] to [true]\\nrepeat until <<(all are 1) = [false]> or <(count) > (length of [list v])>>\\nchange [count v] by (1)\\nif <(length of (item (count) of [list v])) > [1]> then\\nset [all are 1 v] to [false]\\nend\\nend\\nif <(all are 1) = [true]> then\\nset [report v] to []\\nset [count v] to [0]\\nrepeat (length of [list v])\\nchange [count v] by (1)\\nset [report v] to (join (report) (item (count) of [list v]))\\nend\\nelse\\nset [report v] to (item (1 v) of [list v])\\nset [count v] to [1]\\nrepeat ((length of [list v]) - (1))\\nchange [count v] by (1)\\nset [report v] to (join (report) (join [] (item (count) of [list v])))\\nend\\nend\"], [\"replace item (0 v) of [ v] with []\", \"delete (position) of [List v]\\ninsert (item) at (position) of [List v]\"], [\"([ v] contains [])\", \"set [report v] to [false]\\nset [count v] to [0]\\nrepeat (length of [list v])\\nchange [count v] by (1)\\nif <(item (count) of [list v]) = (thing)> then\\nset [report v] to [true]\\nstop [this script v]\\nend\\nend\"], [\"(length of [list v])\", \"(length of (list))\"], [\"add [] to [ v]\", \"insert [thing] at (last v) of [List v]\"], [\"start scene [scene1 v]::control\", \"\\nbroadcast [scene1 v]\\n\"], [\"forever if <>::control\", \"\\nforever\\nif <. . .> then\\n. . .\\nend\\n\"], [\"create clone::control\", \"create clone of [myself v]\"], [\"change costume by (1)::looks\", \"switch costume to ((costume #) + (1))\"], [\"change background by (1)::looks\", \"switch backdrop to ((backdrop #) + (1))\"], [\"say nothing::looks\", \"say []\"], [\"say nothing::looks\", \"think []\"], [\"hide all sprites::looks\", \"broadcast [hide all sprites v]\"], [\"hide all sprites::looks\", \"\\nwhen I receive [hide all sprites v] // put this in every sprite\\nhide\\n\"], [\"stamp transparent (50)::pen\", \"\\nset [ghost v] effect to (...)\\nstamp\\nset [ghost v] effect to (0)\\n\"], [\"(abs ()::operators)\", \"([abs v] of ())\"], [\"(sqrt ()::operators)\", \"([sqrt v] of ())\"], [\"<loud?::sensing>\", \"<(loudness) > [30]>\"], [\"(Scratch days::sensing)\", \"((days since 2000) - (2692))\"], [\"(user id::sensing)\", \"when gf clicked\\nif <not <[\\u2601 users v] contains (username)>> then\\n add (username) to [\\u2601 users v]\\nend\\nrepeat until <(item (check user id) of [\\u2601 users v]) = (username)>\\n change [check user id v] by (1)\\nend\\n\"], [\"(user id::sensing)\", \"say (join [Your User ID is ] (check user id))\"], [\"(user id::sensing)\", \"\\nif <(check user id) = [insert User ID number you want here]> then\\n . . .\\nend\\n\"], [\"(camera motion::sensing)\", \"(video [motion v] on [this sprite v])\"], [\"(camera direction::sensing)\", \"(video [direction v] on [this sprite v])\"], [\"(counter::control)\", \"(counter) // Using a variable\"], [\"incr counter::control\", \"change [counter v] by (1)\"], [\"clear counter::control\", \"set [counter v] to [0]\"], [\"while <> {} :: control\", \"\\nrepeat until <not <. . .>>\\n. . .\\nend\\n\"], [\"for each [v v] in (10) {} :: control\", \"\\nset [i v] to [0]\\nrepeat (...)\\nchange [i v] by (1)\\n. . .\\nend\\n\"], [\"<[ v] received?::events>\", \"\\nwhen I receive [something v]\\nset [something received v] to [true]\\n. . .\\nset [something received v] to [false]\\n\"], [\"<[ v] received?::events>\", \"\\nwhen I receive [something v]\\nset [something received v] to [true]\\nwait (0.5) secs\\nset [something received v] to [false]\\n\"], [\"<[ v] received?::events>\", \"\\nif <(something received) = [true]> then\\n. . .\\n\"], [\"<[ v] received?::events>\", \"\\nwhen gf clicked\\nset [something received v] to [false]\\n\\nwhen I receive [something v]\\nset [something received v] to [true]\\n\"], [\"<[ v] received?::events>\", \"\\n<(something received) = [true]>\\n\"], [\"<[ v] received?::events>\", \"\\nwhen I receive [EVERYOTHERBROADCAST (duplicate and replace) v]\\nset [something received v] to [false]\\n\"], [\"stop [all and press green flag v]\", \"broadcast [Scratch-StartClicked v]\"], [\"<clone?::control>\", \"\\nwhen I start as a clone\\nset [clone? v] to [true] // create a variable for this sprite only, non-clones are set to false\\n\"], [\"<clone?::control>\", \"\\nset [clone? v] to [true]\\ncreate clone of [myself v]\\nset [clone? v] to [false]\\n\"], [\"change by x: () y: ()::motion\", \"go to x: ((x position) + (X)) y: ((y position) + (Y))\"], [\"change by x: () y: ()::motion\", \"\\nchange x by (X)\\nchange y by (Y)\\n\"], [\"glide () secs by x: () y: ()::motion\", \"glide (seconds) secs to x: ((x position) + (X)) y: ((y position) + (Y))\"], [\"glide () secs () steps::motion\", \"glide (seconds) secs to x: ((x position) + (([sin v] of (direction)) * (steps))) y: ((y position) + (([cos v] of (direction)) * (steps)))\"], [\"point towards x: () y: ()::motion\", \"point in direction (([atan v] of (((X) - (x position)) / ((Y) - (y position)))) + (<(y position) > (Y)> * (180)))\"], [\"(distance to x: () y: ()::sensing)\", \"([sqrt v] of ((((x position) - (wanted x)) * ((x position) - (wanted x))) + (((y position) - (wanted y)) * ((y position) - (wanted y)))))\"], [\"<ask in progress?::sensing>\", \"\\nset [ask in progress? v] to [true]\\nask [...] and wait\\nset [ask in progress? v] to [false]\\n\"], [\"<sprite clicked?::sensing>\", \"\\nwhen this sprite clicked\\nset [sprite clicked? v] to [true]\\nwait until <not <<mouse down?> and <touching [mouse-pointer v]?>>>\\nset [sprite clicked? v] to [false]\\n\"], [\"show all sprites::looks\", \"broadcast [show all sprites v]\"], [\"show all sprites::looks\", \"\\nwhen I receive [show all sprites v] // put this in every sprite\\nshow\\n\"], [\"previous costume::looks\", \"switch costume to ((costume #) - (1))\"], [\"previous backdrop::looks\", \"switch backdrop to ((backdrop #) - (1))\"], [\"previous backdrop::looks\", \"switch backdrop to [previous backdrop v]\"], [\"(costume name::looks)\", \"([costume name v] of [wanted sprite v])\"], [\"go to back::looks\", \"go back ([10 ^ v] of (309)) layers\"], [\"go to back::looks\", \"\\nwhen green flag clicked\\nchange [sprites v] by (1)\\n\"], [\"go to back::looks\", \"go back ((sprites)- (1)) layers\"], [\"(() ^ ():: operators)\", \"([10 ^ v] of ((power) * ([log v] of (base))))\\n\"], [\"(() ^ ():: operators)\", \"\\n([e ^ v] of ((power) * ([ln v] of (base))))\\n\"], [\"<true::operators>\", \"<not <>> // Put no boolean in the not block.\"], [\"<true::operators>\", \"<[0] = [0]> // Same input on both slots.\"], [\"<false::operators>\", \"<not <not <>>> // Put no boolean in the second not block.\"], [\"<false::operators>\", \"<<> and <>> // Put no booleans in the and block.\"], [\"<false::operators>\", \"<<> or <>> // Put no booleans in the or block.\"], [\"<false::operators>\", \"<[0] = [1]>\"], [\"<[] \\u2260 []::operators>\", \"<not <[] = []>>\"], [\"<[] \\u2265 []::operators>\", \"<not <[] < []>>\"], [\"<[] \\u2265 []::operators>\", \"<<(input 1) > (input 2)> or <(input 1) = (input 2)>>\"], [\"<[] \\u2264 []::operators>\", \"<not <[] > []>>\"], [\"<[] \\u2264 []::operators>\", \"<<(input 1) < (input 2)> or <(input 1) = (input 2)>>\"], [\"(if <> then [] else []::operators)\", \"\\nif <condition::grey> then\\nset [report v] to (true)\\nelse\\nset [report v] to (false)\\n\"], [\"(if <> then [] else []::operators)\", \"(((true) * <condition::grey>) + ((false) * <not <condition::grey>>))\"], [\"(letters () through () of []::operators)\", \"set [report v] to []\\nset [count v] to (a) // a is the first letter\\nrepeat until <(count) = ((b) + (1))> // b is the last letter\\nset [report v] to (join (report) (letter (count) of (text)))\\nchange [count v] by (1)\\nend\\n\"], [\"(digit () of ()::operators)\", \"(([floor v] of ((number) / ([10 ^ v] of (([floor v] of (digit)) - (1))))) mod (10))\"], [\"(round () to the nearest ()::operators)\", \"((round ((round what) / (to the nearest))) * (to the nearest))\"], [\"(round () to the nearest ()::operators)\", \"((round ((number) * ([10 ^ v] of (number of places)))) / ([10 ^ v] of (number of places)))\"], [\"([ v] effect::looks)\", \"\\nforever\\nset [color v] effect to (effect)\\n\"], [\"<sound [ v] playing?::sound>\", \"\\nset [playing v] to [true]\\nplay sound [wanted sound v] until done\\nset [playing v] to [false]\\n\"], [\"play sound [ v] for (1) beats::sound\", \"\\nplay sound [wanted sound v]\\nrest for (1) beats\\nstop all sounds\\n\"], [\"(instrument::sound)\", \"\\nforever\\nset instrument to (instrument)\\n\"], [\"change item (1 v) of [ v] by (1)::list\", \"replace item (1 v) of [wanted list v] with ((item (1 v) of [wanted list v]) + (1))\"]]\n"
]
}
],
"source": [
"import json\n",
"print(json.dumps(out))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
// navigate to https://scratchblocks.github.io/ and open console
// paste in `var results = <json from above>`
function code(x) { return scratchblocks.parse(x).scripts[0].blocks[0].info.selector; }
function script(x) { return walk(scratchblocks.parse(x).scripts[0]); }
var things = results.map(row => ({ block: code(row[0]), workaround: script(row[1]) }))
function walk(x) {
var blocks = [];
if (x.isScript) {
x.blocks.forEach(function(block) {
[].push.apply(blocks, walk(block));
});
} else if (x.isBlock) {
blocks.push(x.info.selector);
x.children.forEach(function(child) {
if (child.isBlock) {
[].push.apply(blocks, walk(child));
}
});
}
return blocks;
}
[{"block":"whenGreenFlag","workaround":["whenIReceive",null]},{"block":"whenGreenFlag","workaround":["whenSensorGreaterThan","doIf","|","&",null,"mouseY","mousePressed","=","readVariable"]},{"block":"whenKeyPressed","workaround":["whenSensorGreaterThan","doForever"]},{"block":"whenClicked","workaround":["whenSensorGreaterThan","doForever"]},{"block":"whenClicked","workaround":["whenSensorGreaterThan","doForever"]},{"block":"whenSensorGreaterThan","workaround":["whenGreenFlag","doForever"]},{"block":"broadcast:","workaround":["whenGreenFlag","setVar:to:",null,"setVar:to:"]},{"block":"broadcast:","workaround":["doBroadcastAndWait"]},{"block":"doBroadcastAndWait","workaround":["whenGreenFlag","setVar:to:","setVar:to:",null,"setVar:to:","setVar:to:","doWaitUntil","=","readVariable",null]},{"block":"doBroadcastAndWait","workaround":["setVar:to:","broadcast:"]},{"block":"wait:elapsed:from:","workaround":["rest:elapsed:from:","*","/","tempo"]},{"block":"wait:elapsed:from:","workaround":["timerReset","doUntil","not","<","timer"]},{"block":"doForever","workaround":["doUntil"]},{"block":"doForever","workaround":["doRepeat","computeFunction:of:"]},{"block":"doRepeat","workaround":["setVar:to:","doUntil","=","readVariable"]},{"block":"doUntil","workaround":["procDef","call","doIf","not",null]},{"block":"doUntil","workaround":["broadcast:"]},{"block":"doIf","workaround":["doIfElse",null]},{"block":"doIf","workaround":["doBroadcastAndWait",null]},{"block":"doIf","workaround":["whenGreenFlag","doForever"]},{"block":"doIfElse","workaround":["doIf","doIf","not"]},{"block":"doIfElse","workaround":["procDef","doIf",null,"doIf","getParam"]},{"block":"doWaitUntil","workaround":["doUntil",null]},{"block":"stopScripts","workaround":["doWaitUntil"]},{"block":"stopScripts","workaround":["wait:elapsed:from:","computeFunction:of:"]},{"block":"stopScripts","workaround":["doForever"]},{"block":"stopScripts","workaround":["whenIReceive","stopScripts"]},{"block":"heading","workaround":["getAttribute:of:"]},{"block":"xpos","workaround":["getAttribute:of:"]},{"block":"ypos","workaround":["getAttribute:of:"]},{"block":"gotoSpriteOrMouse:","workaround":["gotoX:y:","mouseX","mouseY"]},{"block":"gotoSpriteOrMouse:","workaround":["gotoX:y:","getAttribute:of:","getAttribute:of:"]},{"block":"gotoSpriteOrMouse:","workaround":["xpos:","getAttribute:of:","ypos:","getAttribute:of:"]},{"block":"gotoX:y:","workaround":["xpos:","readVariable","ypos:","readVariable"]},{"block":"gotoX:y:","workaround":["glideSecs:toX:y:elapsed:from:"]},{"block":"pointTowards:","workaround":["setVar:to:","-","getAttribute:of:","xpos","setVar:to:","-","getAttribute:of:","ypos","doIfElse","=","readVariable"]},{"block":"heading:","workaround":["turnRight:","-","heading"]},{"block":"heading:","workaround":["turnLeft:","*","-","heading"]},{"block":"turnRight:","workaround":["heading:","+","heading"]},{"block":"turnLeft:","workaround":["heading:","-","heading"]},{"block":"forward:","workaround":["gotoX:y:","+","xpos","*","computeFunction:of:","heading","+","ypos","*","computeFunction:of:","heading"]},{"block":"forward:","workaround":["changeXposBy:","*","computeFunction:of:","heading","changeYposBy:","*","computeFunction:of:","heading"]},{"block":"changeXposBy:","workaround":["xpos:","+","xpos"]},{"block":"changeYposBy:","workaround":["ypos:","+","ypos"]},{"block":"xpos:","workaround":["changeXposBy:","-","readVariable","xpos"]},{"block":"xpos:","workaround":["changeXposBy:","+","*","xpos","readVariable"]},{"block":"xpos:","workaround":["gotoX:y:","readVariable","ypos"]},{"block":"ypos:","workaround":["changeYposBy:","-","readVariable","ypos"]},{"block":"ypos:","workaround":["changeYposBy:","+","*","ypos","readVariable"]},{"block":"ypos:","workaround":["gotoX:y:","xpos","readVariable"]},{"workaround":[null,"wait:elapsed:from:","readVariable",null]},{"workaround":[null]},{"workaround":[null]},{"block":"lookLike:","workaround":["doUntil","=","readVariable","costumeIndex"]},{"block":"nextCostume","workaround":["lookLike:","+","costumeIndex"]},{"block":"startScene","workaround":["doUntil","=","readVariable","backgroundIndex"]},{"block":"nextScene","workaround":["startScene","+","backgroundIndex"]},{"block":"nextScene","workaround":["startScene"]},{"block":"costumeIndex","workaround":["getAttribute:of:"]},{"block":"backgroundIndex","workaround":["getAttribute:of:"]},{"block":"sceneName","workaround":["getAttribute:of:"]},{"block":"say:duration:elapsed:from:","workaround":["say:","readVariable","wait:elapsed:from:","readVariable","say:"]},{"block":"think:duration:elapsed:from:","workaround":["think:","readVariable","wait:elapsed:from:","readVariable","think:"]},{"block":"filterReset","workaround":["setGraphicEffect:to:","setGraphicEffect:to:","setGraphicEffect:to:","setGraphicEffect:to:","setGraphicEffect:to:","setGraphicEffect:to:","setGraphicEffect:to:"]},{"block":"scale","workaround":["getAttribute:of:"]},{"block":"changeSizeBy:","workaround":["setSizeTo:","+","scale","readVariable"]},{"block":"setSizeTo:","workaround":["changeSizeBy:","-","readVariable","scale"]},{"block":"comeToFront","workaround":["goBackByLayers:","*","computeFunction:of:"]},{"block":"hide","workaround":["setGraphicEffect:to:"]},{"block":"hide","workaround":["lookLike:"]},{"block":"playSound:","workaround":[null,"broadcast:","doPlaySoundAndWait"]},{"block":"doPlaySoundAndWait","workaround":["playSound:","wait:elapsed:from:","readVariable"]},{"block":"rest:elapsed:from:","workaround":["wait:elapsed:from:","*","/","tempo","readVariable"]},{"block":"changeVolumeBy:","workaround":["setVolumeTo:","+","volume","readVariable"]},{"block":"setVolumeTo:","workaround":["changeVolumeBy:","-","readVariable","volume"]},{"block":"volume","workaround":["getAttribute:of:"]},{"block":"changeTempoBy:","workaround":["setTempoTo:","+","tempo","readVariable"]},{"block":"setTempoTo:","workaround":["changeTempoBy:","-","readVariable","tempo"]},{"block":"+","workaround":["-","readVariable","*","readVariable"]},{"block":"+","workaround":["-","readVariable","-","readVariable"]},{"block":"+","workaround":["setVar:to:","readVariable","changeVar:by:","readVariable"]},{"block":"-","workaround":["+","readVariable","*","readVariable"]},{"block":"-","workaround":["+","readVariable","/","readVariable"]},{"block":"-","workaround":["+","readVariable","concatenate:with:","readVariable"]},{"block":"-","workaround":["setVar:to:","changeVar:by:","*"]},{"block":"*","workaround":["deleteLine:ofList:","deleteLine:ofList:","deleteLine:ofList:","setVar:to:","setVar:to:","setVar:to:","doIfElse","<","answer","doRepeat","stringLength:","doIfElse","<","doRepeat","stringLength:","setVar:to:","contentsOfList:","setVar:to:","contentsOfList:","doRepeat","readVariable","setVar:to:","+","readVariable","readVariable","setVar:to:","doRepeat","stringLength:","readVariable","doIf","not","=","readVariable","doIf","&","|","=","readVariable","=","readVariable","not","&","=","readVariable","=","readVariable","setVar:to:","contentsOfList:"]},{"block":"*","workaround":["/","readVariable","/","readVariable"]},{"block":"*","workaround":["doIfElse","<","readVariable"]},{"block":"/","workaround":["deleteLine:ofList:","deleteLine:ofList:","setVar:to:","setVar:to:","setVar:to:","computeFunction:of:","setVar:to:","<","doIfElse","<","readVariable","setVar:to:","<","readVariable","doRepeat","stringLength:","readVariable","doRepeat","-","readVariable","doIfElse","=","rounded","readVariable","readVariable","setVar:to:","setVar:to:","doRepeat","lineCountOfList:"]},{"block":"/","workaround":["doIfElse","<","readVariable"]},{"workaround":["&","not","<","readVariable","readVariable","not","=","readVariable","readVariable"]},{"workaround":["&","not",">","readVariable","readVariable","not","=","readVariable","readVariable"]},{"workaround":["&","not","<","readVariable","readVariable","not",">","readVariable","readVariable"]},{"workaround":["deleteLine:ofList:","append:toList:","readVariable","doIf","list:contains:","readVariable"]},{"block":"&","workaround":["doIf",null]},{"block":"&","workaround":["not","|","not",null,"not",null]},{"block":"&","workaround":["setVar:to:","doUntil","=","readVariable"]},{"block":"&","workaround":["doIfElse"]},{"block":"|","workaround":["doIfElse",null]},{"block":"|","workaround":["not","&","not",null,"not",null]},{"block":"|","workaround":["doIfElse"]},{"block":"not","workaround":["=","readVariable"]},{"block":"not","workaround":["doIfElse"]},{"block":"concatenate:with:","workaround":["setVar:to:","setVar:to:","doRepeat","stringLength:","readVariable","setVar:to:","doRepeat","stringLength:","readVariable","setVar:to:","contentsOfList:"]},{"block":"concatenate:with:","workaround":[]},{"block":"letter:of:","workaround":[]},{"block":"stringLength:","workaround":["setVar:to:","doUntil","=","letter:of:","+","readVariable"]},{"block":"%","workaround":["doIfElse",">","rounded","/","readVariable","readVariable","/","readVariable","readVariable"]},{"block":"rounded","workaround":["setVar:to:","setVar:to:","doUntil","|","=","letter:of:","readVariable","readVariable","=","readVariable","stringLength:","readVariable","doIf","&","=","letter:of:","readVariable","readVariable",">","letter:of:","+","readVariable","readVariable"]},{"block":"rounded","workaround":["setVar:to:","setVar:to:","doUntil","<","computeFunction:of:","readVariable"]},{"block":"rounded","workaround":["procDef","rounded",null,"setVar:to:","doUntil","=","letter:of:","readVariable","getParam","changeVar:by:","doIfElse","=","letter:of:","readVariable","getParam"]},{"block":"computeFunction:of:","workaround":["setVar:to:","readVariable","doIf","<","readVariable"]},{"block":"computeFunction:of:","workaround":["setVar:to:","+","computeFunction:of:","*","readVariable","readVariable"]},{"block":"computeFunction:of:","workaround":["setVar:to:","readVariable","doUntil","=","readVariable","readVariable"]},{"block":"computeFunction:of:","workaround":["setVar:to:","computeFunction:of:","*","computeFunction:of:","readVariable"]},{"block":"computeFunction:of:","workaround":["setVar:to:","/","computeFunction:of:","readVariable","computeFunction:of:","computeFunction:of:"]},{"block":"computeFunction:of:","workaround":["setVar:to:","computeFunction:of:","*","readVariable"]},{"block":"computeFunction:of:","workaround":["setVar:to:","/","computeFunction:of:","readVariable","computeFunction:of:"]},{"block":"computeFunction:of:","workaround":["setVar:to:","computeFunction:of:","*","readVariable","computeFunction:of:"]},{"block":"computeFunction:of:","workaround":["setVar:to:","rounded","-","readVariable"]},{"block":"computeFunction:of:","workaround":["setVar:to:","rounded","+","readVariable"]},{"block":"computeFunction:of:","workaround":["setVar:to:","computeFunction:of:","-","readVariable"]},{"block":"computeFunction:of:","workaround":["setVar:to:","computeFunction:of:","-","readVariable"]},{"block":"computeFunction:of:","workaround":["setVar:to:","/","computeFunction:of:","readVariable","computeFunction:of:","readVariable"]},{"block":"stampCostume","workaround":["setVar:to:","createCloneOf","setVar:to:"]},{"block":"doAsk","workaround":["say:","readVariable","deleteLine:ofList:","setVar:to:","doUntil","&","touching:","mousePressed"]},{"block":"distanceTo:","workaround":["computeFunction:of:","+","*","-","getAttribute:of:","xpos","-","getAttribute:of:","xpos","*","-","getAttribute:of:","ypos","-","getAttribute:of:","ypos"]},{"block":"mouseX","workaround":["doForever"]},{"block":"mouseY","workaround":["doForever"]},{"block":"timestamp","workaround":["setVar:to:","+","-","*","readVariable","computeFunction:of:","/","*","+","readVariable","computeFunction:of:","/","+","readVariable","-","+","computeFunction:of:","/","*","readVariable","readVariable","doIf","<","readVariable","doIf","<","readVariable","doIf",">","readVariable","changeVar:by:"]},{"workaround":["<",null]},{"block":"readVariable","workaround":["getAttribute:of:"]},{"block":"readVariable","workaround":["getAttribute:of:"]},{"block":"setVar:to:","workaround":["changeVar:by:","+","*","readVariable","readVariable"]},{"block":"changeVar:by:","workaround":["setVar:to:","+","readVariable","readVariable"]},{"block":"contentsOfList:","workaround":["setVar:to:","setVar:to:","doUntil","|","=","readVariable",">","readVariable","lineCountOfList:","doIfElse","=","readVariable"]},{"block":"setLine:ofList:to:","workaround":["deleteLine:ofList:","readVariable","insert:at:ofList:","readVariable","readVariable"]},{"workaround":["setVar:to:","setVar:to:","doRepeat","lineCountOfList:"]},{"block":"lineCountOfList:","workaround":["stringLength:","readVariable"]},{"block":"append:toList:","workaround":["insert:at:ofList:"]},{"workaround":["broadcast:"]},{"block":"doForeverIf","workaround":["doForever"]},{"workaround":["createCloneOf"]},{"workaround":["lookLike:","+","costumeIndex"]},{"workaround":["startScene","+","backgroundIndex"]},{"workaround":["say:"]},{"workaround":["think:"]},{"workaround":["broadcast:"]},{"workaround":["whenIReceive","hide"]},{"workaround":["setGraphicEffect:to:","stampCostume","setGraphicEffect:to:"]},{"workaround":["computeFunction:of:"]},{"workaround":["computeFunction:of:"]},{"block":"isLoud","workaround":[">","soundLevel"]},{"workaround":["-","timestamp"]},{"workaround":["whenGreenFlag","doIf","not","list:contains:","getUserName","doUntil","=","getLine:ofList:","readVariable","getUserName"]},{"workaround":["say:","concatenate:with:","readVariable"]},{"workaround":["doIf","=","readVariable"]},{"workaround":["senseVideoMotion"]},{"workaround":["senseVideoMotion"]},{"workaround":["readVariable"]},{"workaround":["changeVar:by:"]},{"workaround":["setVar:to:"]},{"workaround":["doUntil","not",null]},{"workaround":["setVar:to:","doRepeat"]},{"workaround":["whenIReceive","setVar:to:",null,"setVar:to:"]},{"workaround":["whenIReceive","setVar:to:","wait:elapsed:from:","setVar:to:"]},{"workaround":["doIf","=","readVariable"]},{"workaround":["whenGreenFlag","setVar:to:"]},{"workaround":["=","readVariable"]},{"workaround":["whenIReceive","setVar:to:"]},{"block":"stopScripts","workaround":["broadcast:"]},{"workaround":["whenCloned","setVar:to:"]},{"workaround":["setVar:to:","createCloneOf","setVar:to:"]},{"workaround":["gotoX:y:","+","xpos","readVariable","+","ypos","readVariable"]},{"workaround":["changeXposBy:","readVariable","changeYposBy:","readVariable"]},{"workaround":["glideSecs:toX:y:elapsed:from:","readVariable","+","xpos","readVariable","+","ypos","readVariable"]},{"workaround":["glideSecs:toX:y:elapsed:from:","readVariable","+","xpos","*","computeFunction:of:","heading","readVariable","+","ypos","*","computeFunction:of:","heading","readVariable"]},{"workaround":["heading:","+","computeFunction:of:","/","-","readVariable","xpos","-","readVariable","ypos","*",">","ypos","readVariable"]},{"workaround":["computeFunction:of:","+","*","-","xpos","readVariable","-","xpos","readVariable","*","-","ypos","readVariable","-","ypos","readVariable"]},{"workaround":["setVar:to:","doAsk","setVar:to:"]},{"workaround":["whenClicked","setVar:to:","doWaitUntil","not","&","mousePressed","touching:","setVar:to:"]},{"workaround":["broadcast:"]},{"workaround":["whenIReceive","show"]},{"workaround":["lookLike:","-","costumeIndex"]},{"workaround":["startScene","-","backgroundIndex"]},{"workaround":["startScene"]},{"workaround":["getAttribute:of:"]},{"workaround":["goBackByLayers:","computeFunction:of:"]},{"workaround":["whenGreenFlag","changeVar:by:"]},{"workaround":["goBackByLayers:","-","readVariable"]},{"workaround":["computeFunction:of:","*","readVariable","computeFunction:of:","readVariable"]},{"workaround":["computeFunction:of:","*","readVariable","computeFunction:of:","readVariable"]},{"workaround":["not"]},{"workaround":["="]},{"workaround":["not","not"]},{"workaround":["&"]},{"workaround":["|"]},{"workaround":["="]},{"workaround":["not","="]},{"workaround":["not","<"]},{"workaround":["|",">","readVariable","readVariable","=","readVariable","readVariable"]},{"workaround":["not",">"]},{"workaround":["|","<","readVariable","readVariable","=","readVariable","readVariable"]},{"workaround":["doIfElse",null]},{"workaround":["+","*","readVariable",null,"*","readVariable","not",null]},{"workaround":["setVar:to:","setVar:to:","readVariable","doUntil","=","readVariable","+","readVariable"]},{"workaround":["%","computeFunction:of:","/","readVariable","computeFunction:of:","-","computeFunction:of:","readVariable"]},{"workaround":["*","rounded","/","readVariable","readVariable","readVariable"]},{"workaround":["/","rounded","*","readVariable","computeFunction:of:","readVariable","computeFunction:of:","readVariable"]},{"workaround":["doForever"]},{"workaround":["setVar:to:","doPlaySoundAndWait","setVar:to:"]},{"workaround":["playSound:","rest:elapsed:from:","stopAllSounds"]},{"workaround":["doForever"]},{"workaround":["setLine:ofList:to:","+","getLine:ofList:"]}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment