Help with Zoom Function (Stellaris)

Ask gaming related questions (AHK v1.1 and older)
wintermute2_0
Posts: 2
Joined: 05 Dec 2017, 22:24

Help with Zoom Function (Stellaris)

05 Dec 2017, 22:49

Hello, I'm trying to get the following script to work in a game (Stellaris):

PgUp::WheelUp
PgDn::WheelDown

I have a physical disability and can't use a mouse, so this script would allow me to zoom in and out using my on-screen keyboard. But when I press PgUp or PgDn on my on-screen keyboard, nothing happens. When I ask someone to press the keys on the physical keyboard, the script works. The script also does not work if I ask someone to press the physical key when the mouse cursor is positioned over the PgUp or PgDn key on my on-screen keyboard.

I've used this script for other games, so I'm not sure what I'm doing wrong. Any ideas? Thanks.
TygerByte
Posts: 96
Joined: 12 Aug 2016, 05:22

Re: Help with Zoom Function (Stellaris)

06 Dec 2017, 11:37

What on-screen keyboard are you using? Also from what I know the mouse wheel down usually scrolls what ever is under the mouse cursor. So if you are on the On-Screen Keyboard when you try to scroll then it might not pass that on to the game. You could also try rebinding the zoom on Stellaris to another key.
wintermute2_0
Posts: 2
Joined: 05 Dec 2017, 22:24

Re: Help with Zoom Function (Stellaris)

07 Dec 2017, 18:31

I'm using the on-screen keyboard in Windows 10. I tried binding to other keys, but I have the same problem. This is very strange.
TygerByte
Posts: 96
Joined: 12 Aug 2016, 05:22

Re: Help with Zoom Function (Stellaris)

08 Dec 2017, 04:52

Try the following code out. On rare occasions Stellaris might be losing focus and is no longer considered the active window.

Code: Select all

PgUp::
	if !WinActive( "Stellaris ahk_exe stellaris.exe" )
	{
		WinActivate, Stellaris ahk_exe stellaris.exe
	}
	Send, {WheelUp}
Return

PgUp::
	if !WinActive( "Stellaris ahk_exe stellaris.exe" )
	{
		WinActivate, Stellaris ahk_exe stellaris.exe
	}
	Send, {WheelDown}
Return

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 39 guests