mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-07 00:38:16 +00:00
Optional press enter flag for sendKeys
This commit is contained in:
@@ -44,6 +44,10 @@ public class Keyboard implements KeyListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void sendKeys(String s) {
|
public void sendKeys(String s) {
|
||||||
|
sendKeys(s, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sendKeys(String s, boolean enterAfter) {
|
||||||
|
|
||||||
pressTime = System.currentTimeMillis();
|
pressTime = System.currentTimeMillis();
|
||||||
for (char c : s.toCharArray()) {
|
for (char c : s.toCharArray()) {
|
||||||
@@ -56,7 +60,9 @@ public class Keyboard implements KeyListener {
|
|||||||
sendKeyEvent(ke);
|
sendKeyEvent(ke);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
clickKey(10);
|
if (enterAfter) {
|
||||||
|
clickKey(10);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clickKey(char c) {
|
public void clickKey(char c) {
|
||||||
|
|||||||
Reference in New Issue
Block a user