Keyboard Button Opens New Window Under Others


compupix

Well-known member
Member
Local time
4:23 PM
Posts
72
OS
Windows 11
I have an app, RPN_Calculator.exe, that I’d like to execute upon hitting my keyboard’s “calculator” button.
Setting Microsoft Mouse and Keyboard Center’s Calculator button to:
C:\Program Files (x86)\RPN Calculator\RPN_Calculator.exe​
opens the program, but it is hidden by other open programs. Surrounding that string with quotes makes no difference.
[Creating a desktop shortcut:
Target: "C:\Program Files (x86)\RPN Calculator\RPN_Calculator.exe"​
Start in: "C:\Program Files (x86)\RPN Calculator"​
Run: Normal window​
works just fine.]
Clicking on the .exe from File explorer works just fine.
Creating a batch file containing:
START "RPN Calculator" /high "C:\Program Files (x86)\RPN Calculator\RPN_Calculator.exe"​
works just fine.
But when plugging the batch file into the MS Mouse and Keyboard Center’s calculator button still causes the calculator to fly under other open windows.

Help would be appreciated!
 
Windows Build/Version
Windows 11 Home v 22H2; Build: 22621.2134

My Computer My Computer

At a glance

Windows 11Intel 7-1070016gb
OS
Windows 11
Computer type
PC/Desktop
Manufacturer/Model
Del XPS 8940
CPU
Intel 7-10700
Motherboard
Dell 0KV3RP
Memory
16gb
Keyboard
Microsoft Natural Ergonomic Keyboard 4000
Mouse
Kensington Expert Mouse KB64325
Hello, to make the program open in the foreground, you could try adding a command to the macro, to bring it to the front, such as Alt + Tab or Win key + number.
 

My Computers My Computers

  • At a glance

    Windows 11AMD Ryzen 5 560016 GBSapphire Radeon RX 6500XT (8 GB version)
    OS
    Windows 11
    Computer type
    PC/Desktop
    CPU
    AMD Ryzen 5 5600
    Motherboard
    MSI B550-A Pro
    Memory
    16 GB
    Graphics Card(s)
    Sapphire Radeon RX 6500XT (8 GB version)
    Monitor(s) Displays
    BenQ Mobuiz EX2710Q QHD, Iiyama ProLite X23377HDS
    Hard Drives
    MSI Spatium M461 4TB
  • At a glance

    Windows 11Intel Celeron N4020
    Operating System
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Acer A114
    CPU
    Intel Celeron N4020
What was the behaviour of the calculator that used to be run by that keyboard button?
Does RPN Calculator have a support site or user forum that might be able to help you?

Starting the application with a VBScript set to that keyboard button would give you the option of setting it to open with focus i.e. on top of other windows.
For example, RunNotepad.vbs
Code:
WScript.CreateObject("WScript.Shell").Run "%windir%\notepad" , 1, true
starts on top of other windows.
So, in your case, you'd want
Code:
WScript.CreateObject("WScript.Shell").Run "C:\Program Files (x86)\RPN Calculator\RPN_Calculator.exe" , 1, true


PowerShell also has good window focus control but PS is slow to respond.


Best of luck,
Denis



Welcome to ElevenForum.

It's really worth making time to browse through the ElevenForum Tutorial index - there's a shortcut to it at the top of every ElevenForum page [within the Tutorials dropdown list].
- At the foot of the ElevenForum Tutorial index is a shortcut to download it as a spreadsheet.
- I download a new copy each month.
- By downloading it as a spreadsheet I can benefit from Excel's excellent filtering capabilities when I search for topics of interest.
- ElevenForum tutorials are also listed at Tutorials and there's a shortcut to that at the top of every page.

You can search ElevenForum using the search box in the top-right corner of all ElevenForum webpages or using Advanced Search - ElevenForum
- You can also search ElevenForum threads in many general search engines, such as Google, by adding site:elevenforum.com after your search term. For example,
Taskbar setup site:elevenforum.com
- [This is what the search box in the top-right corner of ElevenForum webpages does automatically]
 
Last edited:

My Computer My Computer

At a glance

Windows 11 Home x64 Version 25H2 Build 26200....
OS
Windows 11 Home x64 Version 25H2 Build 26200.8037
The normal Windows calculator behaves normally.
RPN Calc is an old program. Its user forum hasn’t had any activity in years.
Pinning the calculator to the Taskbar is a good workaround. Whether the program is open or closed, clicking on the Taskbar button causes the program to fly on top of everything else.
(The keyboard calculator button is still a problem. But the Taskbar button is easier to use than the dedicated keyboard button.)
Thanks for everyone's comments.
 

My Computer My Computer

At a glance

Windows 11Intel 7-1070016gb
OS
Windows 11
Computer type
PC/Desktop
Manufacturer/Model
Del XPS 8940
CPU
Intel 7-10700
Motherboard
Dell 0KV3RP
Memory
16gb
Keyboard
Microsoft Natural Ergonomic Keyboard 4000
Mouse
Kensington Expert Mouse KB64325

My Computer My Computer

At a glance

Windows 11 Pro Insider 64 bit 25H2 26200.5742Intel Core i7 9700K 3.6016 GBnVidia GEForce RTX 2060 Super
OS
Windows 11 Pro Insider 64 bit 25H2 26200.5742
Computer type
PC/Desktop
Manufacturer/Model
Gigabyte Z390 UD
CPU
Intel Core i7 9700K 3.60
Motherboard
Gigabyte Z390 UD
Memory
16 GB
Graphics Card(s)
nVidia GEForce RTX 2060 Super
Sound Card
onboard
Monitor(s) Displays
Two 27" Dell 4K monitors
Screen Resolution
3840 x 2160
Hard Drives
M.2 NVME SSD, 500 GB; Two 2TB Mechanical HDD's
PSU
850w PSU
Case
Cyberpower PC
Cooling
Water cooled
Keyboard
Backlit Cyberpower gaming keyboard
Mouse
Backlit Cyberpower gaming mouse
Internet Speed
1 GB mbps
Browser
Brave
Antivirus
Windows Security
Back
Top Bottom