Java in script

I'm sure this is some simple thing but here goes: I'm trying to use the Java method keyPress(int) which is part of the Robot class. I keep getting the error:

In fact, I get this for every Java function I've tried. Here' s what I've got:

[code]def sendKeyScript(dataSet):
# Sends the key strokes to the Reflections session....
import system
import system.dataset
import system.db
import system.util
import system.gui

from java.lang import System
from java.awt import Robot
from java.awt.event import KeyEvent

system.util.execute(["C:\Program Files\Reflection\R8win.exe", "c:\createlabel.rsf"])
Robot.keyPress(KeyEvent.VK_C, ret)


Try instantiating the Robot object first:

rob = Robot() rob.delay(3000)

That did it, thanks. Kind of a misleading error though.

I think there is a static delay() method that has a different method signature than the void static() method, because if you try this it works:

rob = Robot() Robot.delay(rob,1000)

Which is why the error complained about arguments.