@ECHO OFF :head mode con:cols=58 lines=25 title Bienvenue - STL echo --------- echo ------------------------ echo -------------------------------- echo -------------------------------------- echo ------------------------------------------- echo ------------------ ------------------ echo ---------------- ---------------- echo -------------- ---------------------- -------------- echo ------------- ---------------------- ------------- echo ------------- ---------------------- ------------ echo ------------ -------- ------------ echo ------------ -------- ------------ echo ------------- -------- ------------ echo ------------- -------- ------------ echo ------------- -------- ------------- echo -------------- -------- -------------- echo ---------------- -------- ---------------- echo ---------------------------------------------- echo ------------------------------------------ echo -------------------------------------- echo -------------------------------- echo ------------------------ echo ---------------------------------------------------------- echo Script To Learn - By Tyleo Dev @ 2023 timeout /NOBREAK 3 >nul goto start :start mode con:cols=55 lines=8 title STL - Menu Principal echo Bienvenue dans un des scripts de learning de Tyleo Dev. echo ------------------------------------------------------- echo 1. Start Now echo 2. Read the Licence echo 3. Exit and give up echo ------------------------------------------------------- set CHK=1 set /p CHK="Votre choix [1/2/3][default:1] : " if "%CHK%"=="1" ( goto init ) else ( rem ) if "%CHK%"=="2" ( goto licence ) else ( rem ) if "%CHK%"=="3" ( exit ) else ( rem ) goto init :init chcp 65001 chcp 1252 set SCORE=0 set TITLE=Base-de-Scripting-Powershell set SPP=------------------------------------------------------------------------------- title %TITLE% goto entry :entry setlocal ENABLEDELAYEDEXPANSION mode con:cols=80 lines=20 echo SCORE : !SCORE! echo !SPP! set /p QST1="Dans une condition PowerShell comme d'autre langages, on commence par __ ?" if "%QST1%"=="if" ( echo Bonne reponse ! +3 points. set /A SCORE=!SCORE!+3 timeout /NOBREAK 2 >nul title %TITLE% - Score : !SCORE! ) else ( echo Mauvaise Reponse... echo Explication : On commence toujours par 'if' qui veux dire 'si' début de condition. ) echo !SPP! echo Appuyez sur une touche pour continuer. pause >nul cls goto scoring-calculation :scoring-calculation : SCORING LEVEL : 20+ set LVL1=Le Débutant - Niveau 1 set LVL1_required=20 : 50+ set LVL2=Le Passionné - Niveau 2 set LVL2_required=50 : 75+ set LVL3=Le Professionnel - Niveau 3 set LVL3_required=75 : 100+ set LVL4=Le Perfectionniste - Niveau 4 set LVL4_required=100 : -19 set LEVEL=Le Testeur - Niveau 0 if /I "!SCORE!" GEQ "!LVL1_required!" set LEVEL=!LVL1! if /I "!SCORE!" GEQ "!LVL2_required!" set LEVEL=!LVL2! if /I "!SCORE!" GEQ "!LVL3_required!" set LEVEL=!LVL3! if /I "!SCORE!" GEQ "!LVL4_required!" set LEVEL=!LVL4! goto end : ZONE DE FIN :end title Fin du quizz !! - Scoring et Niveau mode con:cols=51 lines=8 echo FIN DU QUIZZ - RESULTATS echo --------------------------------------------------- echo Score : !SCORE! echo Niveau : !LEVEL! echo --------------------------------------------------- goto export :export echo Auteur : %USERNAME% sur %USERDOMAIN% echo Quizz : !TITLE! > %USERNAME%-Resultats-%TITLE%.txt echo Score : !SCORE! >> %USERNAME%-Resultats-%TITLE%.txt echo Niveau : !LEVEL! >> %USERNAME%-Resultats-%TITLE%.txt pause >nul exit