From 70ed460c6926fa6e2221948e2012471d40d8c851 Mon Sep 17 00:00:00 2001 From: "Robert C. Maehl" Date: Sun, 27 Jun 2021 09:44:00 -0400 Subject: [PATCH] #66, #64 Improve warning for #66 Fix #64 and change to Yellow ? --- WhyNotWin11.au3 | 74 ++++++++++++++++++++++++++++--------------------- 1 file changed, 43 insertions(+), 31 deletions(-) diff --git a/WhyNotWin11.au3 b/WhyNotWin11.au3 index 44ea8163..2ee13d10 100644 --- a/WhyNotWin11.au3 +++ b/WhyNotWin11.au3 @@ -147,7 +147,7 @@ Func Main() GUICtrlCreateLabel("Your Windows 11 Compatibility Results are Below", 130, 30, 640, 40, $SS_CENTER+$SS_CENTERIMAGE) GUICtrlSetFont(-1, 18, $FW_SEMIBOLD, "", "", $CLEARTYPE_QUALITY) - GUICtrlCreateLabel("whynotwin11.com is not controlled by me. If you are the owner, please contact github", 130, 60, 640, 20, $SS_CENTER+$SS_CENTERIMAGE) + GUICtrlCreateLabel("whynotwin11.com is not controlled by me. If you are the owner, please contact github", 130, 60, 640, 20, $SS_CENTER+$SS_CENTERIMAGE+$SS_SUNKEN) GUICtrlSetBKColor(-1, 0xFFFF00) GUICtrlSetColor(-1, 0xE20012) GUICtrlSetFont(-1, 10) @@ -219,16 +219,20 @@ Func Main() EndIf For $iLine = 1 to $iLines Step 1 $sLine = FileReadLine(@TempDir & "\SupportedProcessorsAMD.txt", $iLine) - If @error = -1 Or $iLine = $iLines Then - GUICtrlSetData($hCheck[2][0], "!") - GUICtrlSetBkColor($hCheck[2][0], 0xF4C141) - ExitLoop - EndIf - If StringInStr(_GetCPUInfo(2), $sLine) Then - GUICtrlSetData($hCheck[2][0], "OK") - GUICtrlSetBkColor($hCheck[2][0], 0x4CC355) - ExitLoop - EndIf + Select + Case @error = -1 + GUICtrlSetData($hCheck[2][0], "!") + GUICtrlSetBkColor($hCheck[2][0], 0xF4C141) + ExitLoop + Case $iLine = $iLines + GUICtrlSetData($hCheck[2][0], "?") + GUICtrlSetBkColor($hCheck[2][0], 0xF4C141) + ExitLoop + Case StringInStr(_GetCPUInfo(2), $sLine) Then + GUICtrlSetData($hCheck[2][0], "OK") + GUICtrlSetBkColor($hCheck[2][0], 0x4CC355) + ExitLoop + EndSelect Next Case StringInStr(_GetCPUInfo(2), "Intel") $iLines = _FileCountLines(@TempDir & "\SupportedProcessorsIntel.txt") @@ -238,16 +242,20 @@ Func Main() EndIf For $iLine = 1 to $iLines Step 1 $sLine = FileReadLine(@TempDir & "\SupportedProcessorsIntel.txt", $iLine) - If @error = -1 Or $iLine = $iLines Then - GUICtrlSetData($hCheck[2][0], "!") - GUICtrlSetBkColor($hCheck[2][0], 0xF4C141) - ExitLoop - EndIf - If StringInStr(_GetCPUInfo(2), $sLine) Then - GUICtrlSetData($hCheck[2][0], "OK") - GUICtrlSetBkColor($hCheck[2][0], 0x4CC355) - ExitLoop - EndIf + Select + Case @error = -1 + GUICtrlSetData($hCheck[2][0], "!") + GUICtrlSetBkColor($hCheck[2][0], 0xF4C141) + ExitLoop + Case $iLine = $iLines + GUICtrlSetData($hCheck[2][0], "?") + GUICtrlSetBkColor($hCheck[2][0], 0xF4C141) + ExitLoop + Case StringInStr(_GetCPUInfo(2), $sLine) Then + GUICtrlSetData($hCheck[2][0], "OK") + GUICtrlSetBkColor($hCheck[2][0], 0x4CC355) + ExitLoop + EndSelect Next Case StringInStr(_GetCPUInfo(2), "SnapDragon") Or StringInStr(_GetCPUInfo(2), "Microsoft") $iLines = _FileCountLines(@TempDir & "\SupportedProcessorsQualcomm.txt") @@ -257,16 +265,20 @@ Func Main() EndIf For $iLine = 1 to $iLines Step 1 $sLine = FileReadLine(@TempDir & "\SupportedProcessorsQualcomm.txt", $iLine) - If @error = -1 Or $iLine = $iLines Then - GUICtrlSetData($hCheck[2][0], "!") - GUICtrlSetBkColor($hCheck[2][0], 0xF4C141) - ExitLoop - EndIf - If StringInStr(_GetCPUInfo(2), $sLine) Then - GUICtrlSetData($hCheck[2][0], "OK") - GUICtrlSetBkColor($hCheck[2][0], 0x4CC355) - ExitLoop - EndIf + Select + Case @error = -1 + GUICtrlSetData($hCheck[2][0], "!") + GUICtrlSetBkColor($hCheck[2][0], 0xF4C141) + ExitLoop + Case $iLine = $iLines + GUICtrlSetData($hCheck[2][0], "?") + GUICtrlSetBkColor($hCheck[2][0], 0xF4C141) + ExitLoop + Case StringInStr(_GetCPUInfo(2), $sLine) Then + GUICtrlSetData($hCheck[2][0], "OK") + GUICtrlSetBkColor($hCheck[2][0], 0x4CC355) + ExitLoop + EndSelect Next Case Else GUICtrlSetData($hCheck[2][0], "?")