pokubot icon indicating copy to clipboard operation
pokubot copied to clipboard

Please make bot running in backgorund

Open Edrocks921 opened this issue 10 years ago • 2 comments

It would be better to fully utilize the pc/laptop.

Edrocks921 avatar Feb 11 '15 13:02 Edrocks921

Hi @norecha ,

To make the bot running in background, I think you can try adb (an Android tool) to capture screen. For example:

<your BS app folder>/HD-Adb.exe shell screencap -p /sdcard/windows/BstSharedFolder/temp.png

Then read the image from BS shared folder. Code example:

Process process = runtime.exec("<your BS app folder>/HD-Adb.exe shell screencap -p /sdcard/windows/BstSharedFolder/temp.png");
int retVal = process.waitFor();
if (retVal == 0)
{
    BufferedImage img =  ImageIO.read(new File("<your BS data folder>/BlueStacks/data/BlueStacks/UserData/SharedFolder/temp.png"));
    return img.getSubimage(x1, y1, x2 - x1, y2 - y1);
}

Hope this helps. :)

bhysyq avatar Jun 01 '15 07:06 bhysyq

And if you dont want to go that techie, you can just set up a virtual second monitor (Windows PC). Thats what I do if I want to use my PC while the bot is running.

Steps:

  • Press [win] + [p]
  • Choose Extend
  • Now you have a 2nd monitor virtually connected to your PC to the right of your actual monitor. Just drop the bluestacks window to the right, off the edge of your screen. Bot would keep running ;)

If you don't see the Extend option,

  • Right click on desktop
  • Goto screen resolution
  • Click on Identify
  • Select the new display (black rectangle) you get
  • Choose a display from the display dropdown
  • Select Extend these displays from Multiple displays
  • ENJOY! :)

ashishmverma1 avatar Jun 01 '15 17:06 ashishmverma1