get("#185")
function lineAbove()
  return lines[curY] or ''
end
function userFunction(line)
  return "Hello.\n"
end
function extensions(hook)
  if hook == 'processEvents1' then
    if inputEvents then
      for _, e in ipairs(inputEvents) do
        if e[1] == 'keyTyped' and e.keyChar == '\n' and userFunction then
          local s = userFunction(lineAbove())
          if s ~= nil then insertText(s) end
        end
      end
    end
  end
endshow applet test run test run with input download show line numbers
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Recognizer | Recognition Result | Visualize | Recalc | 
|---|---|---|---|
| #308 | 470 | [visualize] | 
| Snippet ID: | #203 | 
| Snippet name: | Editor with commands | 
| Eternal ID of this version: | #203/1 | 
| Text MD5: | 48cdeebfd37e1ff1871cabecb8c35457 | 
| Author: | stefan | 
| Category: | editors | 
| Type: | Lua code - GUI | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2014-01-22 21:21:53 | 
| Source code size: | 470 bytes / 22 lines | 
| Pitched / IR pitched: | No / Yes | 
| Views / Downloads: | 1095 / 360 | 
| Referenced in: | [show references] |