Files
PowershellAutomation/internal/runner-launcher.vbs
T
Arne Moerman 6c10d359d2 Enhance SandwichReminder-AutoOrder feature with direct checkout navigation and improved logic
- Added new configuration options for direct checkout navigation, including `useDirectCheckoutNavigation`, `checkoutPath`, and `checkoutOpenDelayMs`.
- Updated the auto-order flow to navigate directly to the checkout page, skipping the mini-cart and date/time steps.
- Improved keyboard automation logic for item remark and order confirmation processes.
- Removed the old SandwichAutoOrder.ps1 file as its functionality has been integrated into SandwichReminder-AutoOrder.ps1.
- Introduced a new runner-launcher.vbs to start the runner.ps1 without a visible console window, ensuring WinForms dialogs can appear.
- Implemented a mutex mechanism in runner.ps1 to prevent concurrent execution of the same feature.
2026-05-11 13:59:22 +02:00

26 lines
906 B
Plaintext

' runner-launcher.vbs
' Starts runner.ps1 without a visible console window.
' Uses a shown/minimized style (not 0) so the process joins the interactive window station,
' which is required for WinForms dialogs to appear. PowerShell's own
' -WindowStyle Hidden suppresses the console window.
Option Explicit
If WScript.Arguments.Count < 1 Then
WScript.Quit 1
End If
Dim runnerPath
runnerPath = WScript.Arguments(0)
Dim shell, cmd
Set shell = CreateObject("WScript.Shell")
cmd = "powershell.exe -NoLogo -NoProfile -Sta -WindowStyle Hidden -ExecutionPolicy Bypass -File """ & runnerPath & """"
' Window style 1 = SW_SHOWNORMAL — do NOT use 0 here.
' Style 0 (CREATE_NO_WINDOW) detaches the process from the interactive
' window station, which prevents WinForms dialogs from rendering.
' PowerShell's own -WindowStyle Hidden flag suppresses the console window.
shell.Run cmd, 1, False
WScript.Quit 0