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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user