Impossible to do mouse clicks behind fade?

Dime333

Active member
RL Member
I'm trying to install Minecraft for my son to surprise him on his birthday. There is a launcher with a "play button" when starting the game that you have to click in order to start the game. It doesn't seem to be possible to start by pressing enter or any other button. I have made a post launch script that clicks the play button after launch, but the problem is that it won't work when fade-in is enabled. Is this impossible to do? The only way I can think of is to disable fade, but that would disable it for all my PC games and that would not be good. Would it be possible somehow to show the launcher over the fade screen? Thanks.

Edit: I just had an idea that might work. If I create a "dummy system" that doesn't use fade-in and use that one when setting up the game with an alternate emulator, it might work. I'll test that and let you know.
 
Last edited:

bleasby

RocketLauncher Developer
Developer
Did you tried to use the controlclick command to send the click directly to the minecraft loader gui?
http://ahkscript.org/docs/commands/ControlClick.htm

Also, you can disable fade at a per game basis.
Just open RLUI > Select your system (PC Games) > Games tab > system audit > right click on the games list > Game Options > Select the mine craft game > set fade-in enabled to false.

You are also probably able to do any RocketLauncher GUI clickable through (including the fade screens) by using something like that on the prelaunch script:
http://www.autohotkey.com/board/topic/30334-make-a-window-transparent-and-click-through-it/?p=194995
http://www.autohotkey.com/board/topic/17901-anyway-to-set-a-window-as-click-through/?p=117077
 

Dime333

Active member
RL Member
Thank you, Bleasby. I'm sure I can make this work now thanks to you.
 
Last edited:

Dime333

Active member
RL Member
OK. So I tried to replace this line:

MouseClick, left, 450, 540

with this:

ControlClick, x450 y540, Minecraft Launcher 1.6.48 ahk_class SunAwtFrame

Now nothing happens. What am I doing wrong
 

Ninja2bseen

Member
RL Member
I had something like this too. In the pc gams u should find a prelaunch for the GAme that u will want to use and it should fix things


Tapatalk signature
 

bleasby

RocketLauncher Developer
Developer
This is not something that I can give you an exact answer.
I would need to have the game and test things by myself.
Just search the AHK forums. There are plenty of threads discussing what you should do to make the ControlClick command work on different situations.
 

Dime333

Active member
RL Member
I had something like this too. In the pc gams u should find a prelaunch for the GAme that u will want to use and it should fix things


Tapatalk signature

I'm not sure what you mean. The game scripts I have in the PC Launcher Module folder are these:

Fix-It Felix Jr Launcher
Sonic Racing Transformed - PostLaunch
Super Mario Bros X - PostLaunch
Super Mario Brox. Crossover - PreLaunch

Should there be a Minecraft script in there?
 

brolly

Administrator
Developer
ControlClick should work even with fade active, but using MouseClick or ControlClick is normally a bad idea as they are very prone to failure. Things are even worse if you use X/Y coordinates like what you are doing, this is almost certain to fail so... don't use them! Use the control class name instead.

Best option would be to check if the button is sending any Post message and use that instead. This requires you to be familiar with WinInspector though.
 

Dime333

Active member
RL Member
ControlClick should work even with fade active, but using MouseClick or ControlClick is normally a bad idea as they are very prone to failure. Things are even worse if you use X/Y coordinates like what you are doing, this is almost certain to fail so... don't use them! Use the control class name instead.

Best option would be to check if the button is sending any Post message and use that instead. This requires you to be familiar with WinInspector though.

I'm sure there are always better ways to do the things I'm trying to do in my scripts. The problem is that I can only use the things that I know how to use. I'm not an advanced AHK user, so I'm gonna be happy with any solution that works for me. When I use ControlClick, the pointer doesn't move att all. I'm guessing it should so I'm not sure what I'm doing wrong.
 
Last edited:

Ninja2bseen

Member
RL Member
just looked. I attempted to make a pre launch script so it would press play but it didn't work. Turns out I just added a mouse aspect to my xpadder profile for the one game so I can scroll over with the controller and push play. I guess what I'm saying is if you figure it out, please let me know lol. I just have a work around since I couldn't get the thing to press play upon the splash screen
 

Dime333

Active member
RL Member
just looked. I attempted to make a pre launch script so it would press play but it didn't work. Turns out I just added a mouse aspect to my xpadder profile for the one game so I can scroll over with the controller and push play. I guess what I'm saying is if you figure it out, please let me know lol. I just have a work around since I couldn't get the thing to press play upon the splash screen

So are you not using fade-in? The window where you need to press play is hidden behind the fade-in and that's why I can't get this to work. If I disable fade-in. My script will press the play button and the game will start. Then I a have a different issue that gives focus to Hyperspin when starting the game in full screen. But that's a different issue.
 

Ninja2bseen

Member
RL Member
Man U r ahead of me then. I'd like that script :D have u tried using the setting hide frontend maybe? Or maybe this ctrl click thing would fix everything as Brolly suggest. I'm a little hopeless with this ahk. U have me rewatching this though. I'm happy to test things and experiment if u share ur script


Tapatalk signature
 

djvj

Administrator
Staff member
Developer
FYI, Controlclick will not move the mouse.

Sent from my SM-N910V using Tapatalk
 

Dime333

Active member
RL Member
Man U r ahead of me then. I'd like that script :D have u tried using the setting hide frontend maybe? Or maybe this ctrl click thing would fix everything as Brolly suggest. I'm a little hopeless with this ahk. U have me rewatching this though. I'm happy to test things and experiment if u share ur script


Tapatalk signature

Yes. Controlclick will work if you do it right. I'm doing something wrong.

Here is the working script with fade turned off.

sleep, 4000
MouseClick, left, 450, 540

ExitScript:
ExitApp

- - - Updated - - -

FYI, Controlclick will not move the mouse.

Sent from my SM-N910V using Tapatalk

OK. Thanks. Any idea why it's not working for me?
 

bleasby

RocketLauncher Developer
Developer
Dime, did you read the control click command documentation that I sent to you?

ControlClick coordinates refers to the window and not the screen.

You are probably making the mistake of using the screen coordinates instead of using the window coordinates as in your example you simple copied the values from the mouseclick to the control click line.
 

bleasby

RocketLauncher Developer
Developer
try this for example:

Code:
winmove, ahk_class SunAwtFrame,, 0, 0, 900, 580
ControlClick, x520 y360, ahk_class SunAwtFrame

edit: nevermind, just try this instead:
Code:
ControlClick, , ahk_class SunAwtFrame
ControlSend,, {Enter}, ahk_class SunAwtFrame
 
Last edited:
Top