Method Summary
Method Attributes Method Name and Description
 
Returns the user's code
 
Sets if block setup is forced in level2
 
API_fullscreen(fullscreen)
Sets tool in fullscreen
 
Gets breakpoints
 
Returns the name of the current dialog
 
Returns the grid's properties
 
Gets the input from I/O
 
Gets the number of lines of code in the last execution
 
Gets the number of instructions run in the last execution
 
Gets the exection time in the last execution
 
Gets breakpoints
 
Gets the output from I/O
 
Returns the name of the current view
 
API_getWhiteboard(gridVisible, guideVisible)
Returns the image binary of the whiteboard
 
Returns if the eSeeCode is ready
 
API_maximize(fullscreen)
Sets the code console maximized
 
Pauses execution
 
Resets the execution
 
Restarts eSeeCode interface
 
Resumes execution
 
Runs code silently
 
API_setAxis(value, action)
Chooses the predefined axis to use for the grid
 
Sets the base path for loading images
 
Sets the default block setup style
 
Adds breakpoints
 
Sets definitions of custom instructions
 
Defines whether to enable execution stepping
 
API_setGridDivisions(value, action)
Sets the number of the lines in the grid
 
API_setGridStep(value, action)
Sets the separation of the lines in the grid
 
Sets a custom image for the whiteboard guide
 
Sets a custom size for the whiteboard guide
 
API_setInput(value, action)
Sets the input in I/O
 
API_setInstructions(value, action)
Sets the instruction blocks to make available to the user
 
Pauses every instruction for a certain amount of time
 
Adds observers
 
Prevent exit when user has entered code
 
API_setTheme(theme, run)
Switches the active theme
 
API_setViewTabs(value, action)
Shows/Hides views tabs
 
Sets the background of the whiteboard
 
API_showFilemenu(value, action)
Shows/Hides the filemenu
 
API_showFullscreenmenu(value, action)
Shows/Hides the fullscreen menu
 
API_showGrid(value, action)
Shows/Hides the grid
 
API_showGuide(value, action)
Shows/Hides the guide
 
API_showThemes(value, action)
Shows/Hides the themes menu
 
API_showTranslations(value, action)
Shows/Hides the translations menu
 
Stops execution
 
API_switchDialog(value, action)
Switches to the specified dialog
 
API_switchLanguage(value, action)
Switches to the specified language
 
API_switchView(value, action)
Switches to the specified view
 
Marks the code as saved now
 
API_uploadCode(code, run)
Loads code into the console
 
Loads postcode into the console
 
API_uploadPrecode(code, run)
Loads precode into the console
Method Detail
{String} API_downloadCode()
Returns the user's code
API_downloadCode()
Returns:
{String} User code

API_forceBlockSetup(value)
Sets if block setup is forced in level2
API_forceBlockSetup(true)
Parameters:
{Boolean} value
Whether or not to force block setup when adding instructions on level2
Since:
3.0

API_fullscreen(fullscreen)
Sets tool in fullscreen
API_fullscreen()
Parameters:
{Boolean} fullscreen Optional
Force fullscreen
Since:
2.3

{Array} API_getBreakpoints()
Gets breakpoints
API_getBreakpoints()
Since:
3.2
Returns:
{Array} Block/Line numbers and/or variable names where breakpoints/watches set up

{String} API_getDialog()
Returns the name of the current dialog
API_getDialog()
Since:
2.3
Returns:
{String} Name of the current dialog

API_getGridProperties()
Returns the grid's properties
API_getGridProperties()
Since:
3.0

{String} API_getInput()
Gets the input from I/O
API_getInput()
Since:
2.3
Returns:
{String} Input in the I/O

{Number} API_getLastExecutionCodeLinesCount()
Gets the number of lines of code in the last execution
API_getLastExecutionCodeLinesCount()
Since:
3.0
Returns:
{Number} Number of lines of code in the last execution

{Number} API_getLastExecutionInstuctionsCount()
Gets the number of instructions run in the last execution
API_getLastExecutionInstuctionsCount()
Since:
3.0
Returns:
{Number} Number of instructions run in the last execution

{Number} API_getLastExecutionTime()
Gets the exection time in the last execution
API_getLastExecutionTime()
Since:
3.0
Returns:
{Number} Execution time of code in the last execution

{Array>} API_getObservers()
Gets breakpoints
API_getObservers()
Since:
3.2
Returns:
{Array>} Block/Line numbers, variable names or line+watch where breakpoints/watches set up

{String} API_getOuput()
Gets the output from I/O
API_getOuput()
Since:
2.3
Returns:
{String} Output in the I/O

{String} API_getView()
Returns the name of the current view
API_getView()
Since:
2.3
Returns:
{String} Name of the current view

{String} API_getWhiteboard(gridVisible, guideVisible)
Returns the image binary of the whiteboard
API_getWhiteboard()
Parameters:
{Boolean} gridVisible
Can be use to force toggling the grid
{Boolean} guideVisible
Can be use to force toggling the guide
Since:
2.3
Returns:
{String} Data URL of the whiteboard

{String} API_isReady()
Returns if the eSeeCode is ready
API_isReady()
Since:
2.4
Returns:
{String} The date since it is ready, undefined otherwise

API_maximize(fullscreen)
Sets the code console maximized
API_maximize()
Parameters:
{Boolean} fullscreen Optional
Force fullscreen
Since:
2.4

API_pause()
Pauses execution
API_pause()
Since:
3.2

API_reset()
Resets the execution
API_reset()
Since:
2.3

API_restart()
Restarts eSeeCode interface
API_restart()
Since:
2.3

API_resume()
Resumes execution
API_resume()
Since:
3.2

API_runCode(code)
Runs code silently
API_runCode("repeat(4){forward(100)}")
Parameters:
{String} code
Code to run
Since:
2.3

API_setAxis(value, action)
Chooses the predefined axis to use for the grid
API_setAxis(0)
Parameters:
{Number|String} value
Index of the predefined axis to use
{Boolean} action Optional, Default: true
Whether to run the actions to apply the changes (true) or just set the variables (false)
Since:
2.3

API_setBasePath(value)
Sets the base path for loading images
API_setBasePath("https://eseeco.de/example/")
Parameters:
{String} value
Base path, can be a full URL
Since:
3.0

API_setBlockSetup(value)
Sets the default block setup style
API_setBlockSetup("basic")
Parameters:
{String} value
Pixels between each line in the grid
Since:
2.4

API_setBreakpoints(value)
Adds breakpoints
API_setBreakpoints([8,"name","age"])
Parameters:
{Number|String|Array} value
Block/Line numbers and/or variable names where breakpoints/watches are to be placed
Since:
3.2

API_setCustomInstructions(value, action)
Sets definitions of custom instructions
API_setCustomInstructions({...})
Parameters:
{Number|String} value
Seconds to wait for the execution to finish
{Boolean} action Optional, Default: true
Whether to run the actions to apply the changes (true) or just set the variables (false)
Since:
3.0

API_setExecutionStep(step)
Defines whether to enable execution stepping
API_setExecutionStep(1)
Parameters:
{Number} step
Number of instructions after which execution must be paused
Since:
3.2

API_setGridDivisions(value, action)
Sets the number of the lines in the grid
API_setGridDivisions(10)
Parameters:
{Number|String} value
Number of lines in the grid
{Boolean} action Optional, Default: true
Whether to run the actions to apply the changes (true) or just set the variables (false)
Since:
2.4

API_setGridStep(value, action)
Sets the separation of the lines in the grid
API_setGridStep(50)
Parameters:
{Number|String} value
Pixels between each line in the grid
{Boolean} action Optional, Default: true
Whether to run the actions to apply the changes (true) or just set the variables (false)
Deprecated:
since version 2.4
Since:
2.3

API_setGuideImage(value)
Sets a custom image for the whiteboard guide
API_setGuideImage("https://eseecode.com/favicon.png")
Parameters:
{String} value
URL where the image is, can be a relative path
Since:
3.2

API_setGuideSize(value)
Sets a custom size for the whiteboard guide
API_setGuideSize(25)
Parameters:
{Integer} value
Size in pixels of the guide
Since:
3.2

API_setInput(value, action)
Sets the input in I/O
API_setInput("1 1 2 3 5 8")
Parameters:
{String} value
Input to use
{Boolean} action Optional, Default: true
Whether to run the actions to apply the changes (true) or just set the variables (false)
Since:
2.3

API_setInstructions(value, action)
Sets the instruction blocks to make available to the user
API_setInstructions("turnLeft;90;forward")
Parameters:
{String} value
Instructions to make available (separated with semi-colon, parameters can be postfixed to each instruction also separated with semi-colons)
{Boolean} action Optional, Default: true
Whether to run the actions to apply the changes (true) or just set the variables (false)
Since:
2.3

API_setInstructionsPause(milliseconds)
Pauses every instruction for a certain amount of time
API_setInstructionsPause(500)
Parameters:
{Number} milliseconds
Time to pause each instruction
Since:
3.0

API_setObservers(value)
Adds observers
API_setObservers(["firstname","surname"])
Parameters:
{Number|String|Array} value
Variable names to observe
Since:
3.2

API_setPreventExit(value)
Prevent exit when user has entered code
API_setPreventExit(false)
Parameters:
{Boolean|String} value
Whether to prevent exit when user has coded
Since:
2.4

API_setTheme(theme, run)
Switches the active theme
API_setTheme("sharp")
Parameters:
{String} theme
Name of the theme to use
{Boolean} run Optional, Default: true
If true, applies the theme immediately
Since:
2.4

API_setViewTabs(value, action)
Shows/Hides views tabs
API_setViewTabs("touch,drag")
Parameters:
{String} value
List of view tabs to display, separated with colon or semi-colon
{Boolean} action Optional, Default: true
Whether to run the actions to apply the changes (true) or just set the variables (false)
Since:
2.4

API_setWhiteboardBackground(url)
Sets the background of the whiteboard
API_setWhiteboardBackground("https://eseecode.com/favicon.png")
Parameters:
{String} url
URL where the background is, can be a relative path
Since:
3.2

API_showFilemenu(value, action)
Shows/Hides the filemenu
API_showFilemenu(false)
Parameters:
{Boolean|String} value
Whether to show it (true) or hide it (false)
{Boolean} action Optional, Default: true
Whether to run the actions to apply the changes (true) or just set the variables (false)
Since:
2.3

API_showFullscreenmenu(value, action)
Shows/Hides the fullscreen menu
API_showFilemenu(false)
Parameters:
{Boolean|String} value
Whether to show it (true) or hide it (false)
{Boolean} action Optional, Default: true
Whether to run the actions to apply the changes (true) or just set the variables (false)
Since:
2.3

API_showGrid(value, action)
Shows/Hides the grid
API_showGrid(false)
Parameters:
{Boolean|String} value
Whether to show it (true) or hide it (false)
{Boolean} action Optional, Default: true
Whether to run the actions to apply the changes (true) or just set the variables (false)
Since:
2.3

API_showGuide(value, action)
Shows/Hides the guide
API_showGuide(false)
Parameters:
{Boolean|String} value
Whether to show it (true) or hide it (false)
{Boolean} action Optional, Default: true
Whether to run the actions to apply the changes (true) or just set the variables (false)
Since:
2.3

API_showThemes(value, action)
Shows/Hides the themes menu
API_showThemes(false)
Parameters:
{Boolean|String} value
Whether to show it (true) or hide it (false)
{Boolean} action Optional, Default: true
Whether to run the actions to apply the changes (true) or just set the variables (false)
Since:
2.4

API_showTranslations(value, action)
Shows/Hides the translations menu
API_showTranslations(false)
Parameters:
{Boolean|String} value
Whether to show it (true) or hide it (false)
{Boolean} action Optional, Default: true
Whether to run the actions to apply the changes (true) or just set the variables (false)
Since:
2.4

API_stop()
Stops execution
API_stop()
Since:
3.2

API_switchDialog(value, action)
Switches to the specified dialog
API_switchDialog("io")
Parameters:
{String} value
Dialog to switch to
{Boolean} action Optional, Default: true
Whether to run the actions to apply the changes (true) or just set the variables (false)
Since:
2.4

API_switchLanguage(value, action)
Switches to the specified language
API_switchLanguage("ca")
Parameters:
{String} value
Language to switch to
{Boolean} action Optional, Default: true
Whether to run the actions to apply the changes (true) or just set the variables (false)
Since:
2.3

API_switchView(value, action)
Switches to the specified view
API_switchView("build")
Parameters:
{String} value
View to switch to
{Boolean} action Optional, Default: true
Whether to run the actions to apply the changes (true) or just set the variables (false)
Since:
2.3

API_updateSavedTime()
Marks the code as saved now
API_updateSavedTime()
Since:
2.4

API_uploadCode(code, run)
Loads code into the console
API_uploadCode("repeat(4){forward(100)}",true)
Parameters:
{String} code
Code to upload
{Boolean} run Optional, Default: false
If true, it runs the code immediately

API_uploadPostcode(code)
Loads postcode into the console
API_uploadPostcode("repeat(4){forward(100)}")
Parameters:
{String} code
Code to set as postcode
Since:
2.4

API_uploadPrecode(code, run)
Loads precode into the console
API_uploadPrecode("repeat(4){forward(100)}")
Parameters:
{String} code
Code to set as precode
{Boolean} run Optional, Default: true
If false, it doesn't run the code immediately, only when the user executes user code
Since:
2.2