Any DLL Call or methods to determin what computer has focus?

I am using AutoHotKey to make some keypresses. I am using the Seemless KVM to control other computers. Is there any way, such as a DLL call or PID info to see what computer has focus?

WinGet, MultiplicityPC, A

If MultiplicityPC == 1{

   Send 'hello PC 1' 

}else Send 'hello PC2' }

 

Thanks

5,053 views 6 replies
Reply #1 Top

Hello,

I have forwarded your report to the Stardock support team for their review and recommendations.

Please keep an eye on this thread for any updates.

We really do appreciate your feedback, thanks.

Reply #2 Top

Instead of something that in-depth, why not just install AutoHotKey on each PC and have both have the same macros?

If I am missing the point here, tell us more about what the end goal is here and what problem you are having reaching it.

Sean Drohan
Stardock Support Manager

Reply #3 Top

I have AHK running on PC1 that is running a Game.  While in combat, AHK types "/Cast Fireball" every 30 seconds, as long as my mouse never leaves PC1, everything works fine. On occasion I have to mouse over to PC2 and click on the Heal button, and I may need to keep my Mouse on PC2 for  well over 30 seconds. The problem is when the seemless KVM is on PC2, AHK running on PC1, it continues to type "/Cast Fireball" which  appears on PC2's screen; this text does nothing but interfere with any heal that I may be trying to do on PC2.

 I would like AHK running on PC1 to "see" that my keyboard/mouse info is being directed to PC2 and to 'pause' and not send any text until the mouse focus is back onto PC1.

While there is a complex way for AHK to send text across a network, it will not "see" where multiplicity has the "focus", and so, be very difficult to implement.

AHK will always send the Text to the computer it is running on , and mutiplicity will always route that Text to what ever PC that has the focus.

Thanks

Reply #4 Top

There is nothing within \ exposed by Multiplicity that would get you what you are asking for I am afraid.

Sean Drohan
Stardock Support Manager 

Reply #6 Top

Though I never found a perfect solution, I went with one that seems to work well as long as my Focus is an app running on the AHK/Middle/PC3 computer.

       MyTitle := 'MyGame123'

        MouseGetPos, ,  , id, , 3

WinGetTitle, HoverTitle, ahk_id %id%

If (MyTitle == HoverTitle)

{

Send 'Yup I am on my game'

}

If I use the seemless KVM   to the 'Left computers'  the X and Y mouse position goes to near 0, and the HoverTitle becomes DPIFIX. KVM to the right computers the X and Y go to near max resolution and the HoverName goes to DPIFIX. So if you had 3 Computers the above code would be good solution. In my case I have 6 Computers and I can not tell if the mouse is on PC4 or PC6, and likewise I can not tell if the mouse is on PC2 or PC1, all I can really say the mouse is not anywhere on PC3.

I hope this helps anyone who needs it.