XAHK icon indicating copy to clipboard operation
XAHK copied to clipboard

Multiple Instances

Open MdBourg98 opened this issue 4 years ago • 7 comments

In the newer video it showed this running on 3 different instances of Minecraft. I cant figure that out.

MdBourg98 avatar Dec 29 '19 19:12 MdBourg98

Hi @MdBourg98 Its currently only for use with one client - Xisuma used a cheet. I am now back on this project and will be updating the code to support multi-client.

Thanks for you commnets

monpjc avatar Jan 15 '20 15:01 monpjc

Hi @monpjc I actually found what he did afterwords and forgot to update this. F3+P lets you Alt+Tab without the game pausing. Not exactly a cheat, just a debug option.

MdBourg98 avatar Jan 15 '20 21:01 MdBourg98

This appears to be a issue within AHK that gets confused as to what keys strokes should be sent to witch window. I think AHK was designed to assist people working one screen more than a addition to game play. Will mark as fix later as will need some work to program correctly. However will talk to Xisuma about how he 'tricked' the program into working and if repeatable will post this as a work around for people to use.

monpjc avatar Jan 26 '20 11:01 monpjc

I manage to kinna make this work my modifying one line on the source code( #11) on my local machine and get a great result on my fishing farm 😄

felixfong227 avatar Feb 15 '20 20:02 felixfong227

Hey @monpjc ! Did you ever find out how he managed to 'trick' the program? I'm using this (very useful, thank you) source code to creating a similar version of this program (redoing a bit of the GUI and adding a couple of farms I use a lot) and I have no idea how to make that work! I've tried looking into the #SingleInstance part, and while I can run multiple instances of the program, once I select a window with the second instance, the first instance just stop sending keys. No idea how to get around this

Fran314 avatar Mar 15 '20 11:03 Fran314

Hey @Fran314 I actually managed to get it to work for several minecraft windows at once with my first try ages ago. My approach was to make two different files with the start picture and the script in them, then I renamed one of the scripts itself differently to the other (You could probably have them in one file, I haven't tried that though yet). Then you start one of the instances and assign it to an MC window. Then start the mode you want to use and get it running. With ALT + TAB you switch to the XAHK menu and by double-clicking the minimize button on the top Right of the MC window you minimize it. Then you start the next instance and also start the selected mode. Now you have two accounts farming whatever you configured them to! :) Stopping is a bit more complicated though (not really, just if you want to Restart it afterwards again- for example you want to check you fish farm chests for a second and then start farming again). This is when you have to close all AHK instances and do the Setting up all over again. Depending on the number of MC Windows you have running at once it can take a Moment :/

So here a bit Shorter:

  1. Make copies of the file with XAHK and the start Image in them.
  2. rename the files and actual scripts uniquely
  3. start the instances singularly and start the mode before starting the next instance

Hope this helps! If you didnt understand my chaotic answer please tell me ;)

XPcrafter avatar May 31 '20 13:05 XPcrafter

This is quite an important issue! There should totally be support for controlling multiple instances of Minecraft at the same time on the same machine. An issue to sort out for this is shortcut conflicts, i.e. if they're all running in the same mode, which one should start on hotkey press?

As discussed already, there are two options for how to implement this feature:

  1. Support multiple instances of minescript As @XPcrafter has found you can kinda get multiple instances of the AHK script running if you jiggle some stuff around and remove the #SingleInstance Force line, as was tried in this pr. This kinda still feels like a work around though, and a better option might be:
  2. Control multiple instances of MC through one script The UI would need a big rework for this, but this would be by far the most elegant solution.

This feature is by no means an easy feat and should probably be done after the UI is sorted out.

histefanhere avatar Feb 22 '22 23:02 histefanhere