Calculus 30 Posted May 7, 2016 Is there a way to add a component listener to the dreambot client? I've been searching for a way, but can't find one. I tried this: getClient().getInstance().getApplet().addComponentListener(new ComponentAdapter() { @Override public void componentMoved(ComponentEvent e) { MethodProvider.log("HI"); } }); Sadly, that's the applet (just the runescape screen inside of dreambot's JFrame). Is there a way to access component listeners for the dreambot JFrame itself? Thanks.
Calculus 30 Author Posted May 18, 2016 use 2 get dreambot frame add component listener M8 idk where you're finding this getFrames() method...
Dogerina 330 Posted May 18, 2016 M8 idk where you're finding this getFrames() method... http://bfy.tw/5pS5
Calculus 30 Author Posted May 18, 2016 http://bfy.tw/5pS5 Smartass that's obvious. There is no method to GET the frame in dreambot. +1 way to go
Dogerina 330 Posted May 18, 2016 Smartass that's obvious. There is no method to GET the frame in dreambot. +1 way to go ???? i literally just gave u a method to get it
Calculus 30 Author Posted May 19, 2016 ???? i literally just gave u a method to get it No, you really didn't. There is no way to access dreambot's frames.
Dogerina 330 Posted May 19, 2016 No, you really didn't. There is no way to access dreambot's frames. fuck off troll import org.dreambot.api.methods.*; import org.dreambot.api.script.*; import java.awt.*; import java.awt.event.*; @ScriptManifest(name = "i can get the dreambot frame haha", description = "xd", author = "cockulus", version = 69, category = Category.AGILITY) public final class TheresLiterallyNoWayToGetTheDreambotFrame extends AbstractScript { @Override public void onStart() { Frame calculusSaidThatItsLiterallyImpossibleToAccessTheDreambotFrame = getDreambotFrame(); if (calculusSaidThatItsLiterallyImpossibleToAccessTheDreambotFrame == null) { throw new RuntimeException("uh oh"); } calculusSaidThatItsLiterallyImpossibleToAccessTheDreambotFrame.addComponentListener(new ComponentAdapter() { @Override public void componentMoved(ComponentEvent e) { MethodProvider.log("LOOOOL IM SOKE BAKED MANG"); } }); } @Override public int onLoop() { return 69_420; } private static Frame getDreambotFrame() { for (Frame frame : Frame.getFrames()) { if (frame.getTitle().toLowerCase().contains("dreambot")) { return frame; } } return null; } }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.