Mouse Events not registering in Game Window

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
3ude
Newbie
Posts: 1
Joined: Mon Mar 27, 2017 6:00 pm

Mouse Events not registering in Game Window

Post by 3ude » Mon Mar 27, 2017 8:32 pm

Just a heads up. I think an anti-scripting wrapper of some sort is going on. Would like to be proven wrong. I've attempted several things, google cannot save me. You're my last resort.

I'm trying to write a bot to do some image recognition and then click on a button. It's a boring repetitive task. Perfect job for a bot. But it doesn't work. Nothing wrong with the script, so I'm only mentioning things in pseudo code. It just isn't working no matter what method I try. My question is more about limitations of the program, and finding some way around the issue that I perhaps am not aware of.

So here's the analysis. First, observe the attached image. The game window has no text. This isn't a mistake on my part. Install ARC and any of their games if you need to see it for yourself. Its nearly impossible to focus onto the specified window by name. I can however get around this by scripting "Alt+Tab". Not ideal, but I'm making this for personal use. So setting up tab order before running the script is fine.

Next. Image recognition does it's job and the mouse moves to the center of the image. Yay!

But then all else fails. No Mouse events are sent. no Keyboard events are sent. Welcome to the scripted input black hole. With the script running I can press Space, or Mouse, and they work. Nothing that Macro Scheduler is sending works.

So I tried using the input Recording feature in the software to see if I could figure out if I had been scripting something wrong. In my experiment I focused into a browser window, typed some text and clicked the mouse at random locations. Then focused into the game window and repeated the actions. Observing the recorded events; everything appears to be normal in the browser window, including window focus. In the game window however, ONLY mouse movement is recorded. Macro scheduler doesn't record any of my other actions and couldn't identify the window.

So that's the end of it. I've even tried using a mouse auto clicker in combination with MacroScheduler. But it didn't work either. Which leads me to believe the game is somehow filtering out scripted events altogether. I just want to know if there's a way around it. Even if I have to use some other software, I'd like to know what so I could include it in my scripts.

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Mouse Events not registering in Game Window

Post by Marcus Tettmar » Tue Mar 28, 2017 7:51 am

Sounds like you've already figured out that you can't send simulated events to this window.

But first can we rule out the obvious - is the game running as admin? If so then that could be the issue:
http://help.mjtnet.com/article/11-contr ... n-as-admin

But if not that, then, yes, it sounds like simulated events are disallowed. It is a game after all. Where's the fun in cheating?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Re: Mouse Events not registering in Game Window

Post by CyberCitizen » Mon Apr 03, 2017 5:04 am

Yes check to see if its running in admin vs MS running as a standard user.

Run the game in a window then try to interact with it. Sometimes full screen causes issues.
FIREFIGHTER

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts