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.
This commit is contained in:
Arne Moerman
2026-05-11 13:59:22 +02:00
parent 2592c0145f
commit 6c10d359d2
7 changed files with 525 additions and 205 deletions
+11
View File
@@ -127,6 +127,17 @@ function Invoke-Feature {
if ($autoOrderConfig -and $autoOrderConfig['enabled']) {
Write-Log -Level Info -Message 'SandwichReminder-AutoOrder is enabled; running auto-order flow.' -Feature 'SandwichReminder'
if (-not (Get-Command -Name Invoke-SandwichAutoOrderFlow -ErrorAction SilentlyContinue)) {
$autoOrderFeaturePath = Join-Path $PSScriptRoot 'SandwichReminder-AutoOrder.ps1'
if (Test-Path $autoOrderFeaturePath) {
. $autoOrderFeaturePath
}
else {
throw "Auto-order feature module not found at '$autoOrderFeaturePath'."
}
}
[void](Invoke-SandwichAutoOrderFlow -AutoOrderConfig $autoOrderConfig -FallbackUrl $Config['url'])
}
else {