Advertisement
Guest User

Untitled

a guest
Feb 18th, 2020
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. while (true) {
  2. File folder = new File("c:\\ZDLeague\\ClientRuntime\\");
  3. File[] listOfFiles = folder.listFiles();
  4.  
  5. if (listOfFiles.length != 0) {
  6. try {
  7. Runtime.getRuntime().exec("powershell ./activateZDaemon.ps1");
  8. TimeUnit.MILLISECONDS.sleep(400);
  9. } catch (Exception e) {}
  10.  
  11. for (File file : listOfFiles) {
  12. if (file.isFile()) {
  13. try (BufferedReader br = new BufferedReader(new FileReader(file))) {
  14. String line;
  15.  
  16. while ((line = br.readLine()) != null) {
  17. BRI.type("rcon "+line);
  18. BRI.enter();
  19. // try {TimeUnit.MILLISECONDS.sleep(400);} catch (Exception e) {}
  20. }
  21. } catch (Exception e) {}
  22. }
  23.  
  24. file.delete();
  25. }
  26.  
  27. BRI.altTab();
  28. }
  29.  
  30. try {TimeUnit.MILLISECONDS.sleep(18);} catch (Exception e) {}
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement