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.
Help with Zoom Function (Stellaris)
-
- Posts: 2
- Joined: 05 Dec 2017, 22:24
Re: Help with Zoom Function (Stellaris)
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.
-
- Posts: 2
- Joined: 05 Dec 2017, 22:24
Re: Help with Zoom Function (Stellaris)
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.
Re: Help with Zoom Function (Stellaris)
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
Who is online
Users browsing this forum: No registered users and 33 guests