-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMenu.ps1
51 lines (45 loc) · 1012 Bytes
/
Menu.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# menú básico
clear-host
write-host "#############################"
write-host ""
write-host " Menu "
write-host ""
write-host "1. Ver version"
write-host "2. Ver fecha"
write-host "3. Ver ayuda"
write-host "4. Abrir bloc de notas"
write-host "5. Abrir calculadora"
write-host "6. Salir"
write-host "#############################"
$opc = Read-Host "Tu opcion: "
write-host ""
write-host "introduciste [$opc]"
#if(opc != 0 || opc >= 6)
if($opc -ne 0 -or $opc -ge 6){
switch($opc){
1 {write-host "version" -ForegroundColor Cyan
get-host
}
2 {write-host "fecha" -ForegroundColor Cyan
get-date
}
3 {write-host "ayuda" -ForegroundColor Cyan
get-help
}
4 {write-host "bloc de notas" -ForegroundColor Cyan
abreBloc
}
5 {write-host "calculadora" -ForegroundColor Cyan
abreCalc
}
6 {write-host "fin" -ForegroundColor Red
exit
}
}#fin switch
}
Function abreBloc{
start notepad
}
Function abreCalc{
start calc
}