Bot Tom Frag 2 Share Posted February 5, 2020 Currently working on a large scale farm deployment. Keep in mind there will be no manual input to the Dreambot client. I'm at the point where I need to make a decision as to whether I want to have each client have multiple tabs with accounts (1-3 tabs max due to proxy being on a per-client basis), or if I should launch a separate Dreambot client for each account. I'm trying to maximize the efficiency of each host, and in my mind it's way more efficient to run multiple tabs per client since the client only has to render 1 screen (whichever tab is active), and also the dreambot UI only has to be loaded once per few accounts. The issue with having multiple tabs per account is that you can't programmatically switch tabs (or atleast I haven't found a way in the Dreambot CLI). I need to be able to see each account's screen for logging, screenshot and monitoring functionality. But I don't need to see both at the same time, so that resources aren't being wasted. Is there any way to interact with the client programmatically to switch tabs or take screenshots? If not, is there any way to remap each tab's rendering to our own source? (like an X11 display server). Also in general is there any way to interact with the running Java client? I know we can launch the client from command-line, but can we in any way interact with it once it's launched? Thanks. Link to comment Share on other sites More sharing options...
Hashtag 8822 Share Posted February 5, 2020 Hey, It's usually adviced to use one tab per client. But whatever fits your needs the best. I just happen to have a function that gets the tab a script is running in. You can then programmatically click the tab button whenever you need to: @Override public void onStart() { final JButton tabButton = TabUtil.getActiveTab(); new java.util.Timer().schedule(new TimerTask() { @Override public void run() { // Open the tab tabButton.doClick(); } }, 5000); } However, I don't see a reason for you to switch tabs programmatically to capture screenshots. You should be able to use getClient().getCanvasImage() to capture the game screen. Link to comment Share on other sites More sharing options...
Bot Tom Frag 2 Author Share Posted February 5, 2020 This is awesome thanks, solved both my problems and lets me output to both a VNC server for live viewing as well as logging and taking screenshots! Do you know if there's a way to actually access the raw data being rendered of the client itself? Like instead of an getClient().getCanvasImage, have something like getClient().getRenderedOutput() which would be a stream of data sent to the Host OS to be displayed? Would make things even a bit easier and more flexible. I looked in the docs but didn't see anything Link to comment Share on other sites More sharing options...
Bot Tom Frag 2 Author Share Posted February 5, 2020 I assume the Dreambot GUI application itself is rendered/handled within Swing or JavaFX, but can we access the graphical output stream of the running OSRS client itself? Link to comment Share on other sites More sharing options...
Bot Tom Frag 2 Author Share Posted February 5, 2020 I've moved my follow-up question to another thread so as not to go off-topic here: Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.