diff --git a/project.properties b/project.properties index ed8527a..a1bdcef 100644 --- a/project.properties +++ b/project.properties @@ -1,6 +1,6 @@ -#Sun, 11 Nov 2012 18:23:08 -0600 +#Wed, 21 Nov 2012 13:12:41 -0600 name=jdb-util -version=1.6 +version=1.7 lib.local=true build.number=0 diff --git a/src/main/com/jdbernard/util/ExtRobot.groovy b/src/main/com/jdbernard/util/ExtRobot.groovy index 3995757..73e0fa7 100755 --- a/src/main/com/jdbernard/util/ExtRobot.groovy +++ b/src/main/com/jdbernard/util/ExtRobot.groovy @@ -8,7 +8,7 @@ public class ExtRobot { @Delegate Robot robot - int delayTime + int delayTime = 100 public ExtRobot() { robot = new Robot() } @@ -20,10 +20,10 @@ public class ExtRobot { } } - public void pressCombination(List keyCodes) { + public void pressCombination(int... keyCodes) { keyCodes.each { keyCode -> robot.keyPress(keyCode) } robot.delay(delayTime) - keyCodes.reverse().each { keyCode -> robot.keyRelease(keyCode) } + (keyCodes as List).reverse().each { keyCode -> robot.keyRelease(keyCode) } } /**