diff --git a/DivaBot/DivaBot.jar b/DivaBot/DivaBot.jar index dd1e67c..ab449b3 100644 Binary files a/DivaBot/DivaBot.jar and b/DivaBot/DivaBot.jar differ diff --git a/DivaBot/calibration_data.txt b/DivaBot/calibration_data.txt index c58f228..e32d7fe 100644 --- a/DivaBot/calibration_data.txt +++ b/DivaBot/calibration_data.txt @@ -1,4 +1,4 @@ -768 -504 -1548 -940 +746 +577 +1527 +1014 diff --git a/DivaBot/capture.png b/DivaBot/capture.png index 52c4de3..693298b 100644 Binary files a/DivaBot/capture.png and b/DivaBot/capture.png differ diff --git a/DivaBot/capture_2.png b/DivaBot/capture_2.png index 470f93d..248c431 100644 Binary files a/DivaBot/capture_2.png and b/DivaBot/capture_2.png differ diff --git a/DivaBot/capture_3.png b/DivaBot/capture_3.png index 4b6cd82..98ad7d9 100644 Binary files a/DivaBot/capture_3.png and b/DivaBot/capture_3.png differ diff --git a/DivaBot/capture_4.png b/DivaBot/capture_4.png index 4b6cd82..98ad7d9 100644 Binary files a/DivaBot/capture_4.png and b/DivaBot/capture_4.png differ diff --git a/DivaBot/capture_5.png b/DivaBot/capture_5.png index aeec6b2..2e0b32b 100644 Binary files a/DivaBot/capture_5.png and b/DivaBot/capture_5.png differ diff --git a/DivaBot/config.txt b/DivaBot/config.txt index 58a13b0..9d836e7 100644 --- a/DivaBot/config.txt +++ b/DivaBot/config.txt @@ -1,4 +1,4 @@ -DISPLAYDATA -16776961*-13369549*100*Gungsuh*600*90*300*Song Title (Japanese+Romanized)*176*136*~-16776961*-13369549*24*Gulim*400*40*300*Overall Rating|Song Title (Romanized)|FC Count*176*240* +DISPLAYDATA -16776961*-13369549*100*Gungsuh*600*90*5000*Song Title (Japanese+Romanized)*176*136*~-16776961*-13369549*24*Gulim*400*40*300*Overall Rating|Song Title (Romanized)|FC Count*176*240*~-16776961*-13369549*24*Gulim*400*40*300*Best Play*0*0* LAST_HEIGHT 40 WIDTH 1127 HEIGHT 765 diff --git a/DivaBot/src/sig/Calibrator.java b/DivaBot/src/sig/Calibrator.java index e2bb0e1..91ec793 100644 --- a/DivaBot/src/sig/Calibrator.java +++ b/DivaBot/src/sig/Calibrator.java @@ -63,6 +63,8 @@ public class Calibrator{ MyRobot.FRAME.setCursor(Cursor.getDefaultCursor()); Overlay.started=false; + MyRobot.FRAME.setAlwaysOnTop(false); + Overlay.OVERLAY.setVisible(true); if (((float)(MyRobot.ENDDRAG.x-MyRobot.STARTDRAG.x)/(MyRobot.ENDDRAG.y-MyRobot.STARTDRAG.y))<=16/9f-0.04|| ((float)(MyRobot.ENDDRAG.x-MyRobot.STARTDRAG.x)/(MyRobot.ENDDRAG.y-MyRobot.STARTDRAG.y))>=16/9f+0.04) { int dialogResult = JOptionPane.showConfirmDialog (null, "Could not detect Megamix properly!\n\nYour calibration cut a bit "+((((float)(MyRobot.ENDDRAG.x-MyRobot.STARTDRAG.x)/(MyRobot.ENDDRAG.y-MyRobot.STARTDRAG.y))<=16/9f-0.04)?"more":"less")+" than expected. Do you want to try selecting a more accurate region?","Warning",JOptionPane.YES_NO_OPTION); @@ -74,7 +76,7 @@ public class Calibrator{ return; } } - Overlay.OVERLAY.setVisible(true); + MyRobot.FRAME.setAlwaysOnTop(true); // failed=CalibrationStage3(p); // if (failed) {return;} diff --git a/DivaBot/src/sig/Display.java b/DivaBot/src/sig/Display.java index 8abca0b..dcde067 100644 --- a/DivaBot/src/sig/Display.java +++ b/DivaBot/src/sig/Display.java @@ -20,6 +20,8 @@ public class Display { int width=200; int height=48; int delay=10000; + long nextUpdateTime = System.currentTimeMillis(); + boolean forceUpdate=false; String[] labels; String currentText; int cycle=0; @@ -101,10 +103,17 @@ public class Display { public void run() { try { while (!deleted) { - AdvanceCycle(); - updateFont(); - MyRobot.p.repaint(); - Thread.sleep(delay); + if (System.currentTimeMillis()>nextUpdateTime) { + if (!forceUpdate) { + AdvanceCycle(); + } + updateFont(); + currentText=interpretLabel(labels[cycle]); + MyRobot.p.repaint(); + nextUpdateTime=System.currentTimeMillis()+delay; + forceUpdate=false; + } + Thread.sleep(50); } } catch (InterruptedException e) { e.printStackTrace(); @@ -205,19 +214,40 @@ public class Display { return (data.songname + " - " + ((data.romanizedname.length()>0)?(data.romanizedname.equalsIgnoreCase(data.englishname))?data.romanizedname:data.romanizedname+" ("+data.englishname+")":data.englishname)) + " by "+data.artist; } case "Play Count":{ - return Integer.toString(data.plays)+" play"+((data.plays!=1)?"s":""); + if (data.plays>0) { + return Integer.toString(data.plays)+" play"+((data.plays!=1)?"s":""); + } else { + return "No Plays"; + } } case "Pass/Play Count":{ - return Integer.toString(data.passes) + "/" + Integer.toString(data.plays)+" play"+((data.plays!=1)?"s":""); + if (data.plays>0) { + return Integer.toString(data.passes) + "/" + Integer.toString(data.plays)+" play"+((data.plays!=1)?"s":""); + } + else { + return "No Plays"; + } } case "Pass/Play Count (+%)":{ - return (data.passes)+"/"+(data.plays)+" play"+((data.plays!=1)?"s":"")+" "+"("+((int)(Math.floor(((float)data.passes)/data.plays*100)))+"% pass rate)"; + if (data.plays>0) { + return (data.passes)+"/"+(data.plays)+" play"+((data.plays!=1)?"s":"")+" "+"("+((int)(Math.floor(((float)data.passes)/data.plays*100)))+"% pass rate)"; + } else { + return "No Plays"; + } } case "FC Count":{ - return data.fcCount +" FC"+(data.fcCount==1?"":"s"); + if (data.plays>0) { + return data.fcCount +" FC"+(data.fcCount==1?"":"s"); + } else { + return "No Plays"; + } } case "FC Count (+%)":{ - return data.fcCount +" FC"+(data.fcCount==1?"":"s")+" "+((int)(Math.floor(((float)data.fcCount)/data.plays*100)))+"% FC rate"; + if (data.plays>0) { + return data.fcCount +" FC"+(data.fcCount==1?"":"s")+" "+((int)(Math.floor(((float)data.fcCount)/data.plays*100)))+"% FC rate"; + } else { + return "No Plays"; + } } default:{ return string; diff --git a/DivaBot/src/sig/DrawCanvas.java b/DivaBot/src/sig/DrawCanvas.java index dc29773..18bff42 100644 --- a/DivaBot/src/sig/DrawCanvas.java +++ b/DivaBot/src/sig/DrawCanvas.java @@ -80,7 +80,7 @@ public class DrawCanvas extends JPanel implements KeyListener,ComponentListener, boolean targetBuffer=false; static Color background = new Color(170,170,170); public static HashMap configData = new HashMap(); - List displays = new ArrayList(); + static List displays = new ArrayList(); public static Display selectedDisplay = null; public static Display draggedDisplay = null; DrawCanvas() throws FontFormatException, IOException { @@ -103,6 +103,13 @@ public class DrawCanvas extends JPanel implements KeyListener,ComponentListener, t.start(); } + public static void refreshAllLabels() { + for (Display d : displays) { + d.forceUpdate=true; + d.nextUpdateTime=System.currentTimeMillis()-1; + } + } + public void pullData(final String songname,final String difficulty) { this.songname=(songname.equalsIgnoreCase("PIANOGIRL")?"PIANO*GIRL":(songname.equalsIgnoreCase("16 -out of the gravity-"))?"1/6 -out of the gravity-":songname); this.difficulty=difficulty; @@ -162,6 +169,7 @@ public class DrawCanvas extends JPanel implements KeyListener,ComponentListener, } scrollX = 0;*/ MyRobot.p.repaint(); + MyRobot.p.refreshAllLabels(); } } } catch (JSONException | IOException e) { diff --git a/DivaBot/src/sig/MyRobot.java b/DivaBot/src/sig/MyRobot.java index 8a85dea..3741e13 100644 --- a/DivaBot/src/sig/MyRobot.java +++ b/DivaBot/src/sig/MyRobot.java @@ -162,7 +162,7 @@ public class MyRobot{ public static String USERNAME = ""; public static String AUTHTOKEN = ""; - public static ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor(); + public static long lastmainlooptime = 0; public static void main(String[] args) throws JSONException, IOException, FontFormatException { @@ -266,315 +266,322 @@ public class MyRobot{ } void BotMain() { + lastmainlooptime=System.currentTimeMillis(); + while (true) { + try { + RunMainLoop(); + Thread.sleep(50); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + } + + + private void RunMainLoop() { + try { try { JSONObject obj = FileUtils.readJsonFromUrl("http://45.33.13.215:4501/rating/"+USERNAME); p.lastRating = p.overallrating; - p.overallrating = (int)obj.getDouble("rating"); - if (p.lastRating110f || data.combo==-1 || data.score==-1) { - System.out.println("Waiting for results to populate..."); - } else - if ((data.combo!=lastcombo || data.fail!=lastfail || data.cool!=lastcool || lastfine!=data.fine || lastsafe!=data.safe || lastsad!=data.sad || lastworst!=data.worst) - && data.score!=lastscore /*|| lastpercent!=percent*/){ - //System.out.println("Results for "+selectedSong.title+" "+difficulty+": "+data.cool+"/"+data.fine+"/"+data.safe+"/"+data.sad+"/"+data.worst+" "+data.percent+"%"); - - System.out.println("Results for "+selectedSong.title+" "+difficulty+": "+data.display()); - File songFolder = new File(selectedSong.title+"/"+difficulty); - if (!songFolder.exists()) { - songFolder.mkdirs(); - } - File[] songFolderFiles = songFolder.listFiles(); - int playId = songFolderFiles.length; - File playFolder = new File(selectedSong.title+"/"+difficulty+"/"+playId); - playFolder.mkdir(); - recordedResults=true; - lastcool=data.cool; - lastfine=data.fine; - lastsafe=data.safe; - lastsad=data.sad; - lastworst=data.worst; - lastpercent=data.percent; - lastcombo=data.combo; - lastscore=data.score; - lastfail=data.fail; - new File("scoreimage.png").renameTo(new File(playFolder,selectedSong.title+"_"+difficulty+"play_"+data.cool+"_"+data.fine+"_"+data.safe+"_"+data.sad+"_"+data.worst+"_"+data.percent+"" - + "_"+data.combo+"_"+data.score+".png")); - results.add(new Result(selectedSong.title,difficulty,data.cool,data.fine,data.safe,data.sad,data.worst,data.percent,data.mod,data.combo,data.score,data.fail)); - SoundUtils.playSound("collect_item.wav"); - //gotoxy(800,64); - //click(); - MYROBOT.setAutoDelay(0); - MYROBOT.keyPress(KeyEvent.VK_CONTROL); - MYROBOT.keyPress(KeyEvent.VK_SHIFT); - MYROBOT.keyPress(KeyEvent.VK_F11); - MYROBOT.keyRelease(KeyEvent.VK_F11); - MYROBOT.keyRelease(KeyEvent.VK_SHIFT); - MYROBOT.keyRelease(KeyEvent.VK_CONTROL); - } - } catch (IOException|NumberFormatException|IndexOutOfBoundsException e) { - e.printStackTrace(); - System.out.println(e.getMessage()); - } - } else { - if (results.size()>0) { - recordingResults=true; - for (Result r : results) { - r.songName=r.songName.equalsIgnoreCase("PIANOGIRL")?"PIANO*GIRL":(r.songName.equalsIgnoreCase("16 -out of the gravity-"))?"1/6 -out of the gravity-":r.songName; - HttpClient httpclient = HttpClients.createDefault(); - HttpPost httppost = new HttpPost("http://45.33.13.215:4501/submit"); - - // Request parameters and other properties. - List params = new ArrayList(); - params.add(new BasicNameValuePair("song", r.songName)); - params.add(new BasicNameValuePair("username", USERNAME)); - params.add(new BasicNameValuePair("authentication_token", AUTHTOKEN)); - params.add(new BasicNameValuePair("difficulty", r.difficulty)); - params.add(new BasicNameValuePair("cool", Integer.toString(r.cool))); - params.add(new BasicNameValuePair("fine", Integer.toString(r.fine))); - params.add(new BasicNameValuePair("safe", Integer.toString(r.safe))); - params.add(new BasicNameValuePair("sad", Integer.toString(r.sad))); - params.add(new BasicNameValuePair("worst", Integer.toString(r.worst))); - params.add(new BasicNameValuePair("percent", Float.toString(r.percent))); - params.add(new BasicNameValuePair("fail", Boolean.toString(r.fail))); - params.add(new BasicNameValuePair("mod", r.mod)); - params.add(new BasicNameValuePair("combo", Integer.toString(r.combo))); - params.add(new BasicNameValuePair("gameScore", Integer.toString(r.score))); - try { - httppost.setEntity(new UrlEncodedFormEntity(params, "UTF-8")); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - } - - //Execute and get the response. - HttpResponse response = null; - try { - response = httpclient.execute(httppost); - } catch (IOException e) { - e.printStackTrace(); - } - HttpEntity entity = response.getEntity(); - - if (entity != null) { - try (InputStream instream = entity.getContent()) { - Scanner s = new Scanner(instream).useDelimiter("\\A"); - String result = s.hasNext() ? s.next() : ""; - System.out.println(result); - instream.close(); - } catch (UnsupportedOperationException | IOException e) { - e.printStackTrace(); - } - } - } - results.clear(); - - try { - JSONObject obj = FileUtils.readJsonFromUrl("http://45.33.13.215:4501/rating/"+USERNAME); - JSONObject obj2 = FileUtils.readJsonFromUrl("http://45.33.13.215:4501/bestplay/"+USERNAME+"/"+URLEncoder.encode(MyRobot.p.songname, StandardCharsets.UTF_8.toString()).replaceAll("\\+", "%20")+"/"+difficulty); - p.lastRating = p.overallrating; - if (obj2.has("score")) { - double newScore = obj2.getDouble("score"); - if (newScore>p.lastScore) { - p.bestPlayTime=System.currentTimeMillis(); - } - p.lastScore = newScore; - } - p.overallrating = (int)obj.getDouble("rating"); - if (p.lastRating=250 && c1.getGreen()>=250 && c1.getBlue()>=250 && c2.getRed()>=10 && c2.getRed()<=25 && c2.getGreen()>=200 && c2.getGreen()<=240 && c2.getBlue()>=180 && c2.getBlue()<=220 && - c3.getRed()>=200 && c3.getRed()<=255 && c3.getGreen()>=200 && c3.getGreen()<=255 && c3.getBlue()>=140 && c3.getBlue()<=220; + } + lastSongSelectTime = System.currentTimeMillis(); + } else { + if (overlayHidden) { + overlayHidden=false; + MyRobot.p.repaint(); + } + if ((selectedSong!=null && difficulty!=null)) { + if (OnResultsScreen() && !recordedResults && !recordingResults && results.size()==0) { + lastSongSelectTime=System.currentTimeMillis(); + MYROBOT.setAutoDelay(0); + MYROBOT.keyPress(KeyEvent.VK_CONTROL); + MYROBOT.keyPress(KeyEvent.VK_SHIFT); + MYROBOT.keyPress(KeyEvent.VK_F12); + MYROBOT.keyRelease(KeyEvent.VK_F12); + MYROBOT.keyRelease(KeyEvent.VK_SHIFT); + MYROBOT.keyRelease(KeyEvent.VK_CONTROL); + Thread.sleep(200); + MYROBOT.refreshScoreScreen(); + ImageIO.write(MYROBOT.createScoreScreenCapture(),"png",new File("scoreimage.png")); + File tmp = new File("tmp"); + if (tmp.exists()) { + FileUtils.deleteFile(tmp); + } else { + tmp.mkdir(); } - - private void GetCurrentDifficulty() { - Color c = new Color(MYROBOT.createScreenCapture(new Rectangle(320,274,10,10)).getRGB(0, 0)); - //return c.getRed()==43 && c.getGreen()==88 && c.getBlue()==213; - if (c.getRed()>100 && c.getRed()<200 && c.getBlue()>200 && c.getBlue()<255 && c.getGreen()<50) { - difficulty="EXEX"; - } else - if (c.getRed()>150 && c.getRed()<255 && c.getBlue()<50 && c.getGreen()<50) { - difficulty="EX"; - } else - if (c.getRed()>175 && c.getRed()<225 && c.getBlue()<50 && c.getGreen()<175 && c.getGreen()>135) { - difficulty="H"; - } else - if (c.getRed()>0 && c.getRed()<50 && c.getBlue()<50 && c.getGreen()<255 && c.getGreen()>190) { - difficulty="N"; + try { + Result data = typeface1.getAllData(MYROBOT.createScoreScreenCapture()); + System.out.println(data); + //ImageIO.write(MYROBOT.,"png",new File("test.png")); + if (data.cool==-1 || data.fine==-1 || data.safe==-1 || data.sad==-1 || data.worst==-1 || data.percent<0f || data.percent>110f || data.combo==-1 || data.score==-1) { + System.out.println("Waiting for results to populate..."); } else - if (c.getRed()>0 && c.getRed()<50 && c.getBlue()>170 && c.getBlue()<230 && c.getGreen()<190 && c.getGreen()>150) { - difficulty="E"; + if ((data.combo!=lastcombo || data.fail!=lastfail || data.cool!=lastcool || lastfine!=data.fine || lastsafe!=data.safe || lastsad!=data.sad || lastworst!=data.worst) + && data.score!=lastscore /*|| lastpercent!=percent*/){ + //System.out.println("Results for "+selectedSong.title+" "+difficulty+": "+data.cool+"/"+data.fine+"/"+data.safe+"/"+data.sad+"/"+data.worst+" "+data.percent+"%"); + + System.out.println("Results for "+selectedSong.title+" "+difficulty+": "+data.display()); + File songFolder = new File(selectedSong.title+"/"+difficulty); + if (!songFolder.exists()) { + songFolder.mkdirs(); + } + File[] songFolderFiles = songFolder.listFiles(); + int playId = songFolderFiles.length; + File playFolder = new File(selectedSong.title+"/"+difficulty+"/"+playId); + playFolder.mkdir(); + recordedResults=true; + lastcool=data.cool; + lastfine=data.fine; + lastsafe=data.safe; + lastsad=data.sad; + lastworst=data.worst; + lastpercent=data.percent; + lastcombo=data.combo; + lastscore=data.score; + lastfail=data.fail; + new File("scoreimage.png").renameTo(new File(playFolder,selectedSong.title+"_"+difficulty+"play_"+data.cool+"_"+data.fine+"_"+data.safe+"_"+data.sad+"_"+data.worst+"_"+data.percent+"" + + "_"+data.combo+"_"+data.score+".png")); + results.add(new Result(selectedSong.title,difficulty,data.cool,data.fine,data.safe,data.sad,data.worst,data.percent,data.mod,data.combo,data.score,data.fail)); + SoundUtils.playSound("collect_item.wav"); + //gotoxy(800,64); + //click(); + MYROBOT.setAutoDelay(0); + MYROBOT.keyPress(KeyEvent.VK_CONTROL); + MYROBOT.keyPress(KeyEvent.VK_SHIFT); + MYROBOT.keyPress(KeyEvent.VK_F11); + MYROBOT.keyRelease(KeyEvent.VK_F11); + MYROBOT.keyRelease(KeyEvent.VK_SHIFT); + MYROBOT.keyRelease(KeyEvent.VK_CONTROL); } + } catch (IOException|NumberFormatException|IndexOutOfBoundsException e) { + e.printStackTrace(); + System.out.println(e.getMessage()); } - private void GetCurrentSong() throws IOException { - BufferedImage img = ImageUtils.toCompatibleImage(MYROBOT.createScreenCapture(new Rectangle(812-10,380-10,WIDTH+20,HEIGHT+20))); - boolean found=false; - LOOP1: - for (int x=0;x<10;x++) { - for (int y=0;y<10;y++) { - Color[] col = new Color[WIDTH*HEIGHT]; - for (int i=0;i0) { + recordingResults=true; + for (Result r : results) { + r.songName=r.songName.equalsIgnoreCase("PIANOGIRL")?"PIANO*GIRL":(r.songName.equalsIgnoreCase("16 -out of the gravity-"))?"1/6 -out of the gravity-":r.songName; + HttpClient httpclient = HttpClients.createDefault(); + HttpPost httppost = new HttpPost("http://45.33.13.215:4501/submit"); + + // Request parameters and other properties. + List params = new ArrayList(); + params.add(new BasicNameValuePair("song", r.songName)); + params.add(new BasicNameValuePair("username", USERNAME)); + params.add(new BasicNameValuePair("authentication_token", AUTHTOKEN)); + params.add(new BasicNameValuePair("difficulty", r.difficulty)); + params.add(new BasicNameValuePair("cool", Integer.toString(r.cool))); + params.add(new BasicNameValuePair("fine", Integer.toString(r.fine))); + params.add(new BasicNameValuePair("safe", Integer.toString(r.safe))); + params.add(new BasicNameValuePair("sad", Integer.toString(r.sad))); + params.add(new BasicNameValuePair("worst", Integer.toString(r.worst))); + params.add(new BasicNameValuePair("percent", Float.toString(r.percent))); + params.add(new BasicNameValuePair("fail", Boolean.toString(r.fail))); + params.add(new BasicNameValuePair("mod", r.mod)); + params.add(new BasicNameValuePair("combo", Integer.toString(r.combo))); + params.add(new BasicNameValuePair("gameScore", Integer.toString(r.score))); + try { + httppost.setEntity(new UrlEncodedFormEntity(params, "UTF-8")); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); } - for (int y=-1;y>-10;y--) { - Color[] col = new Color[WIDTH*HEIGHT]; - for (int i=0;i-10;x--) { - for (int y=0;y<10;y++) { - Color[] col = new Color[WIDTH*HEIGHT]; - for (int i=0;i-10;y--) { - Color[] col = new Color[WIDTH*HEIGHT]; - for (int i=0;ip.lastScore) { + p.bestPlayTime=System.currentTimeMillis(); } + p.lastScore = newScore; } + p.overallrating = (int)obj.getDouble("rating"); + if (p.lastRating=250 && c1.getGreen()>=250 && c1.getBlue()>=250 && c2.getRed()>=10 && c2.getRed()<=25 && c2.getGreen()>=200 && c2.getGreen()<=240 && c2.getBlue()>=180 && c2.getBlue()<=220 && + c3.getRed()>=200 && c3.getRed()<=255 && c3.getGreen()>=200 && c3.getGreen()<=255 && c3.getBlue()>=140 && c3.getBlue()<=220; + } + + private void GetCurrentDifficulty() { + Color c = new Color(MYROBOT.createScreenCapture(new Rectangle(320,274,10,10)).getRGB(0, 0)); + //return c.getRed()==43 && c.getGreen()==88 && c.getBlue()==213; + if (c.getRed()>100 && c.getRed()<200 && c.getBlue()>200 && c.getBlue()<255 && c.getGreen()<50) { + difficulty="EXEX"; + } else + if (c.getRed()>150 && c.getRed()<255 && c.getBlue()<50 && c.getGreen()<50) { + difficulty="EX"; + } else + if (c.getRed()>175 && c.getRed()<225 && c.getBlue()<50 && c.getGreen()<175 && c.getGreen()>135) { + difficulty="H"; + } else + if (c.getRed()>0 && c.getRed()<50 && c.getBlue()<50 && c.getGreen()<255 && c.getGreen()>190) { + difficulty="N"; + } else + if (c.getRed()>0 && c.getRed()<50 && c.getBlue()>170 && c.getBlue()<230 && c.getGreen()<190 && c.getGreen()>150) { + difficulty="E"; + } + } + private void GetCurrentSong() throws IOException { + BufferedImage img = ImageUtils.toCompatibleImage(MYROBOT.createScreenCapture(new Rectangle(812-10,380-10,WIDTH+20,HEIGHT+20))); + boolean found=false; + LOOP1: + for (int x=0;x<10;x++) { + for (int y=0;y<10;y++) { + Color[] col = new Color[WIDTH*HEIGHT]; + for (int i=0;i-10;y--) { + Color[] col = new Color[WIDTH*HEIGHT]; + for (int i=0;i-10;x--) { + for (int y=0;y<10;y++) { + Color[] col = new Color[WIDTH*HEIGHT]; + for (int i=0;i-10;y--) { + Color[] col = new Color[WIDTH*HEIGHT]; + for (int i=0;i