|
|
@ -40,8 +40,9 @@ public class ArcadeScreenshotHandler { |
|
|
|
System.out.println(e.getActionCommand()); |
|
|
|
System.out.println(e.getActionCommand()); |
|
|
|
try { |
|
|
|
try { |
|
|
|
BufferedImage img = CaptureScreen(); |
|
|
|
BufferedImage img = CaptureScreen(); |
|
|
|
ImageIO.write(img,"png",new File("..","screenshot.png")); |
|
|
|
String filename="screenshot"+System.currentTimeMillis()+".png"; |
|
|
|
POSTRequest postRes = new POSTRequest("http://"+args[0]+"/uploadform.html",Path.of("..","screenshot.png")); |
|
|
|
ImageIO.write(img,"png",new File("..",filename)); |
|
|
|
|
|
|
|
POSTRequest postRes = new POSTRequest("http://"+args[0]+"/uploadform.html",Path.of("..",filename)); |
|
|
|
System.out.println(((HttpResponse<String>)postRes.run()).body()); |
|
|
|
System.out.println(((HttpResponse<String>)postRes.run()).body()); |
|
|
|
} catch (FailedResponseException | IOException e1) { |
|
|
|
} catch (FailedResponseException | IOException e1) { |
|
|
|
e1.printStackTrace(); |
|
|
|
e1.printStackTrace(); |
|
|
|