Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To open the Designer Console, use this code (courtesy of Connor Elison @ Sepasoft):

Code Block
linenumberstrue
#open the Designer Console
from java.awt import Robot
from java.awt.event import KeyEvent
robot = Robot()
robot.keyPress(KeyEvent.VK_CONTROL)
robot.keyPress(KeyEvent.VK_SHIFT)
robot.keyPress(KeyEvent.VK_C)
robot.keyRelease(KeyEvent.VK_CONTROL)
robot.keyRelease(KeyEvent.VK_SHIFT)
robot.keyRelease(KeyEvent.VK_C)

...

To clear the contents of the Designer Console, use this code:

Code Block
linenumberstrue
#clear the Designer Console (optional)
from com.inductiveautomation.ignition.client.util.gui import OutputConsole
OutputConsole.getInstance().getComponent(0).getComponent(1).doClick()

...