Skip to content

Commit b29f88d

Browse files
committed
Set Limits on SMRefresh control
1 parent 2a41270 commit b29f88d

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

MSEdgeRedirect_Wrapper.au3

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
Global $sVersion
2929
Global $bIsPriv = _IsDestinationRestricted()
30-
Global Enum $bNoApps, $bNoBing, $bNoChat, $bNoFeed, $bNoImgs, $bNoMSN, $bNoNews, $bNoPDFs, $bNoPilot, $bNoSpotlight, $bNoTray, $bNoUpdates, $sFeed, $sFeedPath, $sImages, $sImagePath, $sNews, $sPDFApp, $sSearch, $sSearchPath, $sSMRefesh, $sStartMenu, $bStartup, $sWeather, $sWeatherPath
30+
Global Enum $bNoApps, $bNoBing, $bNoChat, $bNoFeed, $bNoImgs, $bNoMSN, $bNoNews, $bNoPDFs, $bNoPilot, $bNoSpotlight, $bNoTray, $bNoUpdates, $sFeed, $sFeedPath, $sImages, $sImagePath, $sNews, $sPDFApp, $sSearch, $sSearchPath, $iSMRefesh, $sStartMenu, $bStartup, $sWeather, $sWeatherPath
3131

3232
If @Compiled Then
3333
$sVersion = FileGetVersion(@ScriptFullPath)
@@ -80,7 +80,7 @@ Func RunInstall(ByRef $aConfig, ByRef $aSettings, $bSilent = False)
8080
_SetSettingValue("PDFApp" , $aSettings[$sPDFApp] , $sLocation)
8181
_SetSettingValue("Search" , $aSettings[$sSearch] , $sLocation)
8282
_SetSettingValue("SearchPath" , $aSettings[$sSearchPath] , $sLocation)
83-
_SetSettingValue("SMRefresh" , $aSettings[$sSMRefesh] , $sLocation)
83+
_SetSettingValue("SMRefresh" , $aSettings[$iSMRefesh] , $sLocation)
8484
_SetSettingValue("Weather" , $aSettings[$sWeather] , $sLocation)
8585
_SetSettingValue("WeatherPath", $aSettings[$sWeatherPath], $sLocation)
8686

@@ -319,7 +319,7 @@ Func RunSetup($iType = 0, $bSilent = False, $iPage = 0, $hSetupFile = @ScriptDir
319319
$aSettings[$bNoSpotlight] = _GetSettingValue("NoSpotlight")
320320
$aSettings[$bNoTray] = _GetSettingValue("NoTray")
321321
$aSettings[$bNoUpdates] =_GetSettingValue("NoUpdates")
322-
$aSettings[$sSMRefesh] = _GetSettingValue("SMRefresh")
322+
$aSettings[$iSMRefesh] = _GetSettingValue("SMRefresh")
323323
If $aSettings[$bNoBing] Then
324324
$aSettings[$sSearch] = _GetSettingValue("Search")
325325
$aSettings[$sSearchPath] = _GetSettingValue("SearchPath")
@@ -375,7 +375,7 @@ Func RunSetup($iType = 0, $bSilent = False, $iPage = 0, $hSetupFile = @ScriptDir
375375
$aSettings[$sPDFApp] = _GetSettingValue("PDFApp", "String", $aConfig[$hFile])
376376
$aSettings[$sSearch] = _GetSettingValue("Search", "String", $aConfig[$hFile])
377377
$aSettings[$sSearchPath] = _GetSettingValue("SearchPath", "String", $aConfig[$hFile])
378-
$aSettings[$sSMRefesh] = _GetSettingValue("SMRefresh", "Int", $aConfig[$hFile])
378+
$aSettings[$iSMRefesh] = _GetSettingValue("SMRefresh", "Int", $aConfig[$hFile])
379379
$aSettings[$sStartMenu] = _GetSettingValue("StartMenu", "String", $aConfig[$hFile])
380380
$aSettings[$bStartup] = _GetSettingValue("Startup", "Bool", $aConfig[$hFile])
381381
$aSettings[$sWeather] = _GetSettingValue("Weather", "String", $aConfig[$hFile])
@@ -652,6 +652,7 @@ Func RunSetup($iType = 0, $bSilent = False, $iPage = 0, $hSetupFile = @ScriptDir
652652
Local $hRefresh = GUICtrlCreateInput("100", 110, 120, 50, 20, $ES_NUMBER+$ES_RIGHT)
653653
GUICtrlCreateUpdown($hRefresh)
654654
GUICtrlSetLimit(-1, 2000, 100)
655+
GUICtrlSetData(-1, $iSMRefesh)
655656
Local $hNoIcon = GUICtrlCreateCheckbox("Hide Tray Icon", 170, 120, 120, 20)
656657
GUICtrlSetState(-1, $aSettings[$bNoTray])
657658
Local $hStartup = GUICtrlCreateCheckbox("Start w/ Windows", 300, 120, 120, 20)
@@ -980,7 +981,7 @@ Func RunSetup($iType = 0, $bSilent = False, $iPage = 0, $hSetupFile = @ScriptDir
980981
$aSettings[$sPDFApp] = $sHandler
981982
$aSettings[$sSearch] = GUICtrlRead($hEngine)
982983
$aSettings[$sSearchPath] = $sEngine
983-
$aSettings[$sSMRefesh] = GUICtrlRead($hRefresh)
984+
$aSettings[$iSMRefesh] = GUICtrlRead($hRefresh)
984985
$aSettings[$bStartup] = _IsChecked($hStartup)
985986
$aSettings[$sWeather] = GUICtrlRead($hWeather)
986987
$aSettings[$sWeatherPath] = $sWeatherEng
@@ -1151,6 +1152,14 @@ Func RunSetup($iType = 0, $bSilent = False, $iPage = 0, $hSetupFile = @ScriptDir
11511152
EndIf
11521153
Next
11531154

1155+
Case $hMsg = $hRefresh
1156+
Switch GUICtrlRead($hRefresh)
1157+
Case 0 To 999
1158+
GUICtrlSetData($hRefresh, 100)
1159+
Case 2001 To 9999
1160+
GUICtrlSetData($hRefresh, 2000)
1161+
EndSwitch
1162+
11541163
Case $hMsg = $hSearch
11551164
If _IsChecked($hSearch) Then
11561165
GUICtrlSetState($hEngine, $GUI_ENABLE)

0 commit comments

Comments
 (0)