First, great work on an eternal htpc issue, finding an app that makes a computer feel more like it is here to help than to make us work to do what is intended to do.
I downloaded and tried Flex, and found some issues with focus. So I tried to solve them with a vbs script. I am attaching that, and the prompt I used to make google ai code that for me, since I am way not a programmer.
Hope this helps your big launcher project.
CONTEXT SUMMARY FOR AI:
We previously engineered a high-performance, zero-WMI HTPC startup focus shield suite consisting of two files:
- "FlexLaunch.vbs": A lightweight, self-contained VBScript that parses "config.ini" on boot, natively resolves ".lnk" targets via Shell properties, and hosts a tight memory-based loop using SWbemLocator InstancesOf("Win32_Process") with a 150ms/50ms dynamic back-off. It holds focus on "Flex Launcher" until an authorized app process name matches a flattened RAM string array, or until the launcher is closed. It kills the background logger synchronously on exit via a filtered taskkill call.
- "Focus_launcher.ps1": A passive background .NET/Win32 API telemetry logger that records foreground handle/PID shifts down to the hardware millisecond as long as the vbs is alive, utilizing UTF-8 encoding to prevent text file corruptions. Since vbs runs at logon trigered by a scheduled task, this ps1 runs with a delay, there is a period when there is no logger (hence the blind, forced focus of the vbs).
This couple of scripts are meant to provide responsive, seamless experience to the user (using keyboard, IR/Bluetooth remote control, or game controller, no mouse) so that apps can be accessed and launched without hassle.
FlexLaunch.vbs.txt
Focus_launcher.ps1.txt
This is the Windows task I use to launch the app and then the script
FlexLauncher.xml
And here is a sample of the log they produce
12:31:30.898 - Script started
12:31:31.382 - Retrieved authorized apps:
kodi.exe
playnite.fullscreenapp.exe
firefox.exe
12:31:31.667 - Logging requested
12:31:32.019 - Forced focus start
12:32:07.410 - Authorized app found:[Playnite.FullscreenApp.exe], forced focus terminated
12:32:07.742 - Logger successfully terminated
14:22:20.578 - Script started
14:22:20.687 - Retrieved authorized apps:
> kodi.exe
> playnite.fullscreenapp.exe
> firefox.exe
14:22:20.789 - Logging requested
14:22:20.835 - Forced focus start
14:22:57.394 - Flex Launcher was closed by user, forced focus terminated
14:22:57.691 - Logger successfully terminated
First, great work on an eternal htpc issue, finding an app that makes a computer feel more like it is here to help than to make us work to do what is intended to do.
I downloaded and tried Flex, and found some issues with focus. So I tried to solve them with a vbs script. I am attaching that, and the prompt I used to make google ai code that for me, since I am way not a programmer.
Hope this helps your big launcher project.
CONTEXT SUMMARY FOR AI:
We previously engineered a high-performance, zero-WMI HTPC startup focus shield suite consisting of two files:
This couple of scripts are meant to provide responsive, seamless experience to the user (using keyboard, IR/Bluetooth remote control, or game controller, no mouse) so that apps can be accessed and launched without hassle.
FlexLaunch.vbs.txt
Focus_launcher.ps1.txt
This is the Windows task I use to launch the app and then the script
FlexLauncher.xml
And here is a sample of the log they produce
12:31:30.898 - Script started
12:31:31.382 - Retrieved authorized apps:
14:22:20.578 - Script started
14:22:20.687 - Retrieved authorized apps:
> kodi.exe
> playnite.fullscreenapp.exe
> firefox.exe
14:22:20.789 - Logging requested
14:22:20.835 - Forced focus start
14:22:57.394 - Flex Launcher was closed by user, forced focus terminated
14:22:57.691 - Logger successfully terminated