Files
OpenSuperClone/res/oscscripts/hddmenu
T
2024-08-07 12:59:09 +02:00

75 lines
1.3 KiB
Plaintext

# main menu
seti $printhelp = $printhelp
# set this so scripts know the menu is being used
seti $using_menu = 1
# this needs to be initially set so it can be used later
seti $help = $help
while 1 = 1
echo " "
echo "Main Menu"
echo "Q) Quit"
echo "H) Toggle Script Help"
echo "1) Device Information"
echo "2) Read Sectors"
echo "3) Write Sectors"
echo "4) Erase Sectors"
echo "5) Tools"
echo "6) Security"
echo "7) Vendor Specific Commands"
echo "8) Custom"
if $printhelp = 1
exit 0
endif
echo "Enter your choice:"
userinput $choicestring
if $choicestring = q
break
elseif $choicestring = h
if $help = 0
seti $help = 1
echo "Help is now turned on"
else
seti $help = 0
echo "Help is now turned off"
endif
elseif $choicestring = 1
loadscript hddsubmenu_info
elseif $choicestring = 2
loadscript hddsubmenu_read
elseif $choicestring = 3
loadscript hddsubmenu_write
elseif $choicestring = 4
loadscript hddsubmenu_erase
elseif $choicestring = 5
loadscript hddsubmenu_tools
elseif $choicestring = 6
loadscript hddsubmenu_security
elseif $choicestring = 7
loadscript hddsubmenu_vsc
elseif $choicestring = 8
loadscript hddsubmenu_custom
else
echo "bad choice= " $choicestring
endif
done
end