Difference between revisions of "API Console"

From Flowcode Help
Jump to navigationJump to search
(XML import)
(XML import)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<sidebar>API contents</sidebar>
+
<sidebar>API Contents</sidebar>
 
Text console additions
 
Text console additions
 +
  
 
__TOC__
 
__TOC__
Line 15: Line 16:
 
|width="35%"|[[API Console.GetDefault|GetDefault]]
 
|width="35%"|[[API Console.GetDefault|GetDefault]]
 
|Gets the default (read-only) console window
 
|Gets the default (read-only) console window
 +
|-
 +
|width="35%"|[[API Console.Rename|Rename]]
 +
|Renames the given console
 
|-
 
|-
 
|width="35%"|[[API Console.SetMemMode|SetMemMode]]
 
|width="35%"|[[API Console.SetMemMode|SetMemMode]]
 
|Sets whether to show address and bytes for the console
 
|Sets whether to show address and bytes for the console
 +
|-
 +
|width="35%"|[[API Console.SetInputRGB|SetInputRGB]]
 +
|Sets the colour of text inserted by the user from now on
 +
|-
 +
|width="35%"|[[API Console.SetOutputRGB|SetOutputRGB]]
 +
|Sets the colour of text inserted by the component from now on
 
|-
 
|-
 
|width="35%"|[[API Console.WriteText|WriteText]]
 
|width="35%"|[[API Console.WriteText|WriteText]]
Line 43: Line 53:
  
 
==Examples==
 
==Examples==
''No examples available''
+
This demonstration creates two console windows, one is a memory window and one is a text window.
 +
 
 +
When the pin A.0 goes high the view of each switches - the text window displays as memory and vice versa. Though the view changes, the ''type'' of console stays the same - one is fixed memory, the other is a stream that is always added to.
 +
 
 +
{{Fcfile|SIMAPI Console.fcfx|SIMAPI Console}}
  
 
==See also==
 
==See also==
 +
[[API Debug.Print]]
 +
 +
[[API Scope]]

Latest revision as of 15:57, 16 January 2014

<sidebar>API Contents</sidebar> Text console additions


Functions provided for this class

AddText Adds a window to the list of consoles available
AddMemory Adds a window to the list of consoles available
GetDefault Gets the default (read-only) console window
Rename Renames the given console
SetMemMode Sets whether to show address and bytes for the console
SetInputRGB Sets the colour of text inserted by the user from now on
SetOutputRGB Sets the colour of text inserted by the component from now on
WriteText Adds a block of text to the console window
GetLineText Reads a line of text from the given console, pass -1 for final line
SetLineText Writes a line of text from the given console, pass -1 for final line
GetLineBytes Reads a line of bytes from the given console extending the array if needed
SetLineBytes Writes a line of bytes from the given console, pass -1 for final line
CountLines Counts the number of lines in the console
ClearText Clears all the text in the console


Examples

This demonstration creates two console windows, one is a memory window and one is a text window.

When the pin A.0 goes high the view of each switches - the text window displays as memory and vice versa. Though the view changes, the type of console stays the same - one is fixed memory, the other is a stream that is always added to.

FC6 Icon.png SIMAPI Console

See also

API Debug.Print

API Scope