all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
import java.awt.Robot
|
||||
public static void type(String str){
|
||||
Robot robot = new Robot();
|
||||
for(char ch:str.toCharArray()){
|
||||
if(Character.isUpperCase(ch)){
|
||||
robot.keyPress(KeyEvent.VK_SHIFT);
|
||||
robot.keyPress((int)ch);
|
||||
robot.keyRelease((int)ch);
|
||||
robot.keyRelease(KeyEvent.VK_SHIFT);
|
||||
}else{
|
||||
char upCh = Character.toUpperCase(ch);
|
||||
robot.keyPress((int)upCh);
|
||||
robot.keyRelease((int)upCh);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue