ExtRobot: added default delay time, bugfix.
This commit is contained in:
parent
d2706e30bb
commit
01c2f4930a
@ -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
|
||||
|
@ -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) }
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user