Help executing a keyboard shortcut in Edge on a specific page.

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
AngelSing
Posts: 1
Joined: 08 Mar 2023, 22:46

Help executing a keyboard shortcut in Edge on a specific page.

Post by AngelSing » 08 Mar 2023, 23:11

Greetings, recently I bought an ultra widescreen monitor which has caused some problems for me when viewing search results on Bing and Google, since the search results are placed on one side and I have to rotate my head too much. Therefore, I looked for an extension that would automatically center the page, but the problem is that I couldn't find one that is really useful, since it centers all web pages and when searching for images, they go outside the window. In the end, I found one that restarts every time a page is opened, but the problem is that you have to press a keyboard shortcut to activate it, so I'm looking for a way to automatically press the keyboard shortcut, but only when I'm in the Bing and Google search results, excluding image and video searches, etc. I came across AutoHotkey, but I don't really understand anything about coding and programming, so I would like to ask for your help to see if there is a code that can automatically execute a keyboard shortcut, but only for https://www.bing.com/search?q= and https://www.google.com/search?q=. I was also thinking about a code that centers these pages when they are opened, so as not to use the extension, although with this method I already tried using the help of ChatGPT, but the codes that were given to me worked with errors since they didn't move all the elements of the page. Meanwhile, the extension does it really well. I hope you can help me with this problem. I will leave some screenshots.

This is how the screen normally looks when searching for something.
Image

This is what it looks like when I use the extension to center it with the shortcut (alt+n).
Image

Return to “Ask for Help (v2)”