无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
查看: 5210|回复: 4
打印 上一主题 下一主题

[讨论] MBROSTool制作的U盘启动盘BIOS模式下启动界面如何调整菜单窗口高度

[复制链接]
跳转到指定楼层
1#
发表于 2020-4-20 20:02:15 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 tianchengge 于 2020-4-22 11:22 编辑

       目前正在用MBROSTool制作一个集合windows,mac,linux,Android四个系统安装与维护的超级U盘,目前第一步就遇到了拦路虎, legacy BIOS模式下能启动,EFI模式下不能启动(不能启动是因为MACpe,去掉可以启动了,上个帖子我就添加了两个winpe,两种模式都可以启动,帖子地址:http://bbs.wuyou.net/forum.php?m ... 0019&extra=page%3D2  ) legacy BIOS模式下目前共16项(实际比下图虚拟启动多一项从本地硬盘启动)想在一个页面内显示,目前单页内就能显示11项,因为启动界面下方还有很大的区域空闲。再就是想让标题“欢迎您使用天成哥PE维护系统”和图标向左移动一下,一直没成功。



       附完整8MB分区下的所有文件,下载地址:链接:https://share.weiyun.com/55RAMOJ 其中应该是UDM文件夹下的udmsmenu.sh里面设置开头所提显示项目。现附录在下:

!BAT
#cfg@: 9 241 10 11 12 13 14 16
#BIOS启动设为“自然风”。
#放到子盘
debug off ;; if ""=="%udmsgn%" && (77)/udmboot > nul || set _=
set rdev= && set hdmid= && set peid= && set __root= && set bdbg= && set bfd0= && set mf_cache= && set _clock= && set mf= && set _win=
set LDUDPE=ldudpe
#ldudpe --help 获得说明
set ch=2
set autono=0x0
#set PE_PSW=
#set PE_PSW1=
set quickmnu=1
set bHOTKEY=
set udmb=
#set _win=-dis
set _f1= ;; set smod= ;; set _sp= ;; set icox= ;; set __en= ;; set ldr= ;; set bsub= ;; set _win_sp= ;; if "-sub"=="%~1" && set bsub=1 && if "menu"=="%~2" set bsub=2 ;; if "-sub:menu"=="%~1" set bsub=2 ;; if "-sub"=="%~1"  if "sysinit"=="%~2" set bsub=3
#if "3"=="%bsub%" && set /e "@GRBPSWP=--xy=_20:10  Password:" && set ch= && set autono= && set icox= && goto :eof
#if ""=="%bsub%" ldudpe --sub (hd0) 2# *
if not ""=="%bsub%" set PE_PSW= && set PE_PSW1= && set quickmnu=
if "%ch%"=="%udmgui%" if "1"=="%bsub%" goto :eof
set udmgui=%ch%
if ""=="%bsub%" if not ""=="%@usrbuf%" set /a mf=%@usrbuf% + 256 > nul ;; if ""=="%mf%" && if ""=="%bsub%" && (77)/xldr -menu mf || set _=
if ""=="%bsub%" && set mf=(md)%mf%+240 && echo -n > (md)%mf%+240
if ""=="%bsub%" if not ""=="%@usrbuf%" set /a mf_cache=%@usrbuf% + 256 + 240 > nul || set _=;; if ""=="%mf_cache%" && if ""=="%bsub%" && (77)/xldr -cfg mf_cache || set _=
#硬盘加速
geometry --lba127sector (0x80) || set _=
#if ""=="%bsub%" setmenu --u
##国际化#############
#GRBTITL参数: G4D版本号(%^s或%^0s) 日期(%^s或%^0s)  mem_lower(%^dK) mem_upper(%^dM) mem_higher(%^ldM) End(%^X)
#if %ch%>=2 set "@GRBTITL=        多UDM菜单 %^s %^s 内存 %^dK/%^dM/%^ldM , End: %X"
#if not ""=="%bsub%" if %ch%>=2 set "@GRBTITL= 欢迎您使用天成哥PE维护系统"
if ""=="%bsub%" if %ch%>=2 set "@GRBTITL= 欢迎您使用天成哥PE维护系统"
if %ch%>=2 set /e @GRBBOT1=\n 用 ↑ 和 ↓ 键选择菜单。
if %ch%>=2 set /e @GRBBOT2= 启动按<ENTER>键或'b'。\n 获得控制按'p'。
if %ch%>=2 set /e @GRBBOT3= 启动按<ENTER>键或'b'。\n 修改按'e'。进入命令行按'c'。
if %ch%>=2 set /e @GRBBOT4= 编辑选定行按 'e' , 删除则按 'd',按 'O'/'o' 在前/后新开一行。修改完毕后,启动按 'b', 进入命令行按'c', 放弃并回到菜单按 <ESC>键。
if %ch%>=2 set /e @GRBBOT5=\r    菜单 %d 秒后自动执行。  
if %ch%>=2 set /e @GRBBOT6= 高亮的菜单%d 秒后自动执行。
if %ch%>=2 set /e @GRBHAD1=\n [ 支持小巧的、BASH式的、可编辑命令行。行首词按<TAB>键列出匹配的命令。\n   其它地方按<TAB>列出匹配的设备或文件。%s ]\n
if %ch%>=2 set /e @GRBHAD2=  任何时候按<ESC>键退出。
if %ch%>=2 set "@GRBPROM=命令> "
#菜单密码提示信息
if not "3"=="%bsub%" if %ch%>=2 set /e "@GRBPSWE=\n 密码错误\n\n\n 按任意键返回..."
if %ch%<=1 set /e "@GRBPSWE=\n Incorrect password\n\n\n Press any key to return MENU..."
if %ch%>=2 set /e "@GRBPSWT=密码错误!\n"
if %ch%>=2 set /e "@GRBPSW2=密码错误! 按任意键继续..."
#if %ch%>=2 set __en=--en
if ""=="%__en%" if %ch%>=2 set /e "@GRBPSWP= 输入密码:" ;; if %ch%>=2 if "3"=="%bsub%" set /e "@GRBPSWP=--xy=20:10  输入PE整体密码:"
if %ch%>=2 set TITLEUSR=用户区 ! set TITLEUSR=USER PT
if %ch%>=2 set TITMANPT=主盘 ! set TITMANPT=MAIN PT
##下行禁止 底部显示
#set udmb=\n\n
##中文图形#############
if ""=="%bsub%" && if not exist (77)/inited && insmod (77)/fat > nul || set _= ;; set topd=%~d0 ;; set topd=(fd76)
set gfx= && set wall= && set udmsfont= && set onlyapp= && set hotkey= && set isusb= && set wallpre=600 && set "cmdtheme=call :theme_600x16"
#gfx-message菜单文件%gfx%
set h=%@time:~0,2% ;; set /a h=%h% > nul
# 奇数开始对 %ho%: 1-2 3-4 5-6 7-8 9-10 11-12 ... 23-24
set /a _=%h% + 24 - 1 % 24 + 1    + 1 & 0xFE - 1 > nul ;; set /a ho=%_%+1 > nul ;; set ho=%_%-%ho% ;; set _=
# 偶数开始对 %he%: 0-1 2-3 4-5 6-7 8-9 10-11 ... 22-23
set /a _=%h% & 0xFE > nul ;; set /a he=%_%+1 > nul ;; set he=%_%-%he% ;; set _=
if not "1"=="%bsub%" call :getcfg
if not "1"=="%bsub%" if not "3"=="%bsub%" call :getgfx
#字符模式帮助设置
#echo setmenu --help=38::13 >> %mf%
#echo setmenu --keyhelp=0:0x00000000 >> %mf%
#====固定模式位置参数
set _gpos=10:100
#====图标切换ms数
set icochms=800
#====HELP切换ms数
set hlpchms=800
#====HELP停留ms数
set hlpstams=3000
#====HELP文字颜色,高8位透明度,前加*则不变
set hlpcolr=0x20000000
#set hlpcolr=*0x20000000
#====HELP背景色,高8位透明度,前加*则不渐变
set hlpbcolr=0x802FC5F7
#====HELP边框宽度
set hlpbord=5
#====HELP整体不透明度(0~256),前加*则不渐变
set hlpalpha=
#====HELP图片不透明度(0~256),前加*则不渐变
set hlpPalph=0x80
#====菜单文本随图标渐变:0~0x100=渐变   -1或空=不
set titlech=0x80
#set titlech=1
#set titlech=0x10
#set titlech=
#====列表不渐变:
#set f=L1
#====列表渐变黑:
#set f=L2
#====列表渐变半:
set f=L3
#====固定不渐变:
#set f=g1
#====固定渐变:
#set icochms=400 ;; set f=g2
set cmdtheme= && if not "1"=="%bsub%" %cmdtheme%
if not "1"=="%bsub%" if not "3"=="%bsub%" if ""=="%gfx%"  call :getwall
set h= && set he= && set ho= && set hy=
#颜色
if ""=="%bsub%" if ""=="%gfx%" if %ch%>=2 color 0x11747c8611FFFFFF 0x11747c8611b6ed1e
if ""=="%gfx%" && if %ch%>=1 && if not ""=="%smod%" && graphicsmode -1 %smod%  8:32 || graphicsmode -1 100:1000 100:1000 24:32
if ""=="%gfx%" && if %ch%>=1 && if exist udmsfont && font %udmsfont% || set _=
echo !BAT > (77)/curcfg ;; echo set uscrn=%@xresol% %@yresol% >> (77)/curcfg ;; echo set ufont=%udmsfont% >> (77)/curcfg
#壁纸+动画+WIN
call :setwall_win
call :sethotkey
#色块
#if not ""=="%wall%" && splashimage --fill-color=0x401C1C1C:488:154:280:154 > nul || set _=
if ""=="%bsub%" if ""=="%gfx%" call :setanimated
if ""=="%bsub%" && if exist onlyapp && if not exist (77)/inited && FAT copy %topd%/%onlyapp% (77)/usrolapp.ini > nul || set _=
set udmsfont= && set onlyapp= && set udmdh= && set smod=
#if not ""=="%bsub%" %topd%/udm/udmmenuset x=5 w=71 y=2 h=19 b=21 n=0
if not ""=="%bsub%" call Fn.0 0x41000 "!BAT\necho -P:0000 $[0000]\t\t\t\t\t\t\t\t\t\0"
if not ""=="%bsub%" && set bsub= && set icox= && set hotkey= && set isusb= && set _m_str_x= && set _m_str_y= && set _m_box_x= && set PIC_X= && set PIC_Y= && set _au_num= && set m_str= && goto :eof
if ""=="%bsub%" && if not exist (77)/inited && fat mkfile size=0 (77)/inited > nul || set _=
if ""=="%PE_PSW1%" goto :no_PE_PSW1
:do_PE_PSW1
password %PE_PSW1% && goto :no_PE_PSW1 || set _=
clear
pause --wait=3 > nul
clear
goto  :do_PE_PSW1
:no_PE_PSW1
#检测本地window系统
set hdldr= ;; if not "--rescu"=="%~1" call :chklocsys
#检测本地硬盘
set /A hn=*0x475&0xff > nul
#本地系统 会禁止 本地硬盘
set isusb= && if not exist isusb && if not ""=="%hdldr%" && set hn=1
#VHD自动隐藏命令
set vhdhide=0
#if exist /vhdhidemenu.lst && set vhdhide=1
#菜单初始化
set mnum=0 && echo -e \n\n                                          > %mf%
##默认启动菜单设置#############支持XXms  XXtk
echo timeout 15 >> %mf%
echo default 0 >> %mf%
#gfx-message菜单
if not ""=="%gfx%" echo gfxmenu %topd%/udm/%gfx% >> %mf%
#禁止退出gfxmenu
#if not ""=="%gfx%" echo configfile %mf% >> %mf%
if not ""=="%PE_PSW%" echo -e password %PE_PSW% \|| set _= >> %mf%
##下行不显示顶行
#echo initscript (md)0x208+1 >> %mf%
#支持热键
if "1"=="%bHOTKEY%" if exist hotkey echo -e %topd%/udm/HOTKEY \|| set _= >> %mf%
#自动编号用开关:--auto-num-on
if %autono%>=1 set _au_num=--auto-num-on ! set _au_num=
echo set _= >> %mf%
set  "m_str=MulUDmMenu" ;; if %ch%>=2 set "m_str=欢迎您使用天成哥PE维护系统"
#禁止ced等键
set diskey=
#set diskey=--disablekey=a
#旧式长选择条
set longsel=
#set longsel=--highlight-full
#左右键功能move hori
set leftrigh=
set leftrigh=--leftright=hori
echo setmenu %_au_num% %fontsp% --string=%_m_str_x%=%_m_str_y%=0xfff000="%m_str%" --box %_m_box_x% l=0 c=1 --ver-off %longsel% %diskey% %leftrigh% --setstat >> %mf%
echo setmenu %timexy% >> %mf%
echo setmenu %timepbar% >> %mf%
set style=::
if /i "L2"=="%f%" set style=*:*:
if /i "L3"=="%f%" set style=*:*:0x80
if /i "g1"=="%f%" set style=%_gpos%:
if /i "g2"=="%f%" set style=*%_gpos%: ;; set _gpos=
#配置默认菜单图标
echo -e setmenu --ico-entry=$1@*0x80:*:*:0:0:%style%:%icochms%:%titlech%   %topd%/udm/pic/udmdh%icox%.png \|| set _= >> %mf% ;; set style= ;; set icochms=
set bHOTKEY= ;; set hotkey=
#配置默认HELP图片
#echo -e setmenu --hlp-entry=@*0x80:*:*:0:0:::0x80:: %topd%/udm/pic/help3.png \|| set _= >> %mf% ;; set style= ;; set icochms=
#配置不同的HELP图片
#echo -e setmenu --hlp-entry=@*0x80:0:0:0:0:: %topd%/udm/pic/help.png \|| set _= >> %mf%
#echo -e setmenu --hlp-entry=@*0x80:1:1:0:0:: %topd%/udm/pic/help1.png \|| set _= >> %mf%
#echo -e setmenu --hlp-entry=@*0x80:2:2:0:0:: %topd%/udm/pic/help2.png \|| set _= >> %mf%
#echo -e setmenu --hlp-entry=@*0x80:3:3:0:0:: %topd%/udm/pic/help3.png \|| set _= >> %mf%
#echo -e setmenu --hlp-entry=@*0x80:4:4:0:0:: %topd%/udm/pic/help4.png \|| set _= >> %mf%
#echo -e setmenu --hlp-entry=@*0x80:5:5:0:0:: %topd%/udm/pic/help5.png \|| set _= >> %mf%
#echo -e setmenu --hlp-entry=@*0x80:6:6:0:0:: %topd%/udm/pic/help4.png \|| set _= >> %mf%
#echo -e setmenu --class=windows --ico-entry=$1@*0x80:::0:5 %topd%/udm/pic/window%icox%.png \|| set _= >> %mf%
echo -e setmenu --iconsdef=$1@*0x80:%topd%/udm/pic/**.png?%icox% \|| set _= >> %mf%
:END_TB
set wallpre= ;; set _m_str_x= ;; set _m_str_y= ;; set _m_box_x= ;; set PIC_X= ;; set PIC_Y= ;; set _au_num= ;; set m_str=
set fontsp= ;; set timepbar= ;; set timexy= ;; set id= ;; set _clock=
set mureboot=Reboot
if %ch%>=2 set mureboot=重启计算机
set muhalt=Poweroff
if %ch%>=2 set muhalt=关闭计算机
set mulochd=Boot Local HD
if %ch%>=2 set mulochd=启动本地硬盘
set mulocsys=Boot Local System
if %ch%>=2 set mulocsys=启动本地系统
#菜单
#使得编号从1开始(GFX有问题)
#if not ""=="%gfx%" echo title \ \n\n >> %mf%
#if not ""=="%gfx%" echo     clear >> %mf%
set gfx=

#VHD调试菜单
if %vhdhide%==1 echo title VHD深度隐藏调试菜单%udmb% >> %mf%
if %vhdhide%==1 echo     configfile %topd%/vhdhidemenu.lst >> %mf%

#菜单:本地window系统
if not ""=="%hdldr%" echo title %mulocsys%%%%udmb% >> %mf%
if not ""=="%hdldr%" echo     root (hd0,0) >> %mf%
if not ""=="%hdldr%" echo -e     makeactive \> nul >> %mf%
if not ""=="%hdldr%" echo -e     hiddenflag --clear \> nul >> %mf%
if not ""=="%hdldr%" echo -e     map --unmap=70:79 \&& map --rehook >> %mf%
if not ""=="%hdldr%" echo -e     chainloader /%hdldr% \|| chainloader +1 >> %mf%
##自动菜单#####################
#defudmmenu 1  "标题" 引导文件 [--menu[-all]]  [--class ico] [--all] [--[n]quick]  [--fd0] [--end] [--opt: "..."] [--clear] [--cmd1: 命令] [--cmd1x: 扩展命令] [--cmd: 命令] [--cmdx: 扩展命令] [--pcmd: 命令] [--pcmdx: 扩展命令]
# -cmd[p]x: 命令中可以含 \>  \>>   \&&  \||  \|  \;;
# --cmd1[x]是最开始的命令 --cmd[x]是挂载前的命令 --pcmd[x]是挂载后的命令
##启动菜单#####################
###MDYBLOGTAG:MENUX-BEGIN###
defudmmenu 1  "Win10 64位PE维护系统(2G以上内存使用)" *
defudmmenu 2  "Win10 32位PE维护系统(2G以下内存可用)" *
defudmmenu 3  "Win2003 PE维护系统(老机可用)" *
defudmmenu 4  "运行卡巴斯基应急系统(救援中毒不开机)" *
defudmmenu 5  "安装原版Win7 Win8.1 Win10系统" *
defudmmenu 6  "安装原版XP系统" *
defudmmenu 7  "kon-boot绕过密码登录系统" *
defudmmenu 8  "清除主板COMS密码(小白慎用)" *
defudmmenu 9  "MaxDos工具箱" *
defudmmenu 10 "运行Porteus口袋操作系统(属Linux系统)" *
defudmmenu 11 "安装linux操作系统(U盘下放镜像编辑配置)" *
defudmmenu 12 "运行RemixOS安卓操作系统" *
defudmmenu 13 "MAC OS.X.PE(适用苹果机)" *
defudmmenu 14 "%TITLEUSR%" * --all --nquick
###MDYBLOGTAG:MENUX-END###

echo title %mureboot%%%%udmb% >> %mf%
echo #titlecfg: --class reboot >> %mf%
echo -e \  reboot >> %mf%
#echo title %muhalt%%%%@xresol%X%@yresol%%%%udmb% >> %mf%
echo title %muhalt%%%%udmb% >> %mf%
echo #titlecfg: --class power >> %mf%
echo -e \  halt >> %mf%

#菜单:本地硬盘
if %hn%>=2 echo title %mulochd%%%%udmb% >> %mf%
if %hn%>=2 echo #titlecfg: --class harddisk --class return >> %mf%
if %hn%>=2 echo -e \  map (hd0)  (hd1) >> %mf%
if %hn%>=2 echo -e \  map (hd1)  (hd0) >> %mf%
if %hn%>=2 echo -e \  map --rehook >> %mf%
if %hn%>=2 echo -e \  rootnoverify (hd0) >> %mf%
if %hn%>=2 echo -e \  chainloader (hd0)+1 >> %mf%
set mureboot= && set muhalt= && set mulochd= && set mulocsys= && set hn= && set hdldr= && set vhdhide= ;; set icox=
#半自写命令示例  启动第1分区
#defmeu 1 "H3CDALL维护系统"  *  --cmd: "password --md5  $1$ihw0$5mfnm9XLwUDgNmZAWFcSY/"
#自写命令示例  启动第1分区
#defmeu 1 ""  *   --check
#if "%udmretbt%"=="1" echo title H3CDALL维护系统%udmb% >> %mf%
#if "%udmretbt%"=="1" echo -e setmenu --u \;; set "@GRBTITL=" >> %mf%
#if "%udmretbt%"=="1" echo password --md5  $1$ihw0$5mfnm9XLwUDgNmZAWFcSY/ >> %mf%
#if "%udmretbt%"=="1" echo -e command %LDUDPE% --qboot4x %udmret% %udmretsz% %udmretva% %udmrettp% %force% %udmdev%  %id%  * \|| set _= >> %mf%
#支持【单一程序】
#if %udmret%>=0 (76)/udm/usr_onlyapp.sh 1 || set _=
#全自写命令示例  启动硬盘第1分区
#echo title 启动第1分区%udmb% >> %mf%
#echo -e \  setmenu --u \;; set "@GRBTITL=" >> %mf%
#echo -e \  root (hd0,0) >> %mf%
#echo -e \  chainloader +1 >> %mf%
if "--rescu"=="%~1" echo title 硬盘菜单%udmb% >> %mf%
if "--rescu"=="%~1" echo -e \  setmenu --u \;; splashimage --animated=00 \> nul \|| set _= \;; set "@GRBTITL=" >> %mf%
if "--rescu"=="%~1" echo -e \  root (76) \|| set _=\n  configfile (77)/rescu_hd >> %mf%
##内置中文字体示例##############
#echo 591A:0200020007F008203840048003400C8071F802080C103220014001800E007000 >> %mf%
#echo 62E9:200027F822082110F0A0204021B0264E3040E3F82040204027FC2040A0404040 >> %mf%
#菜单完毕
root > nul
call Fn.0 0x41000 "!BAT\necho -P:0000 $[0000]\t\t\t\t\t\t\t\t\t\0"
set ch= && set autono= && set udmretbt= && set udmid= && set _f1= && set leftrigh= && set titlech= && set f=
set _root=
set PE_PSW= && set PE_PSW1= && set quickmnu= ;; set _win= ;; set _win_sp= ;; set hlpPalph=
set num= && set idx= && set id= && set title1= && set btldr= && set p= && set mf_cache= && set udmgui=
set udmdev= && set udmret= && set udmretsz= && set udmrettp= && set udmretva= && set udmrethd=
#if  %mnum%<=0 set mnum= && set mf= && goto :eof
set mnum=
set mf= && set y=runmenu && set ldr=%mf% && set topd=
goto :eof
##完毕#########################
#动画功能
:setanimated
if not exist udmdh  goto :eof
set udmdh=
setlocal
#动画文件
set _=%topd%/udm/pic/udmdh.png
#ldudpe --cd- --err- (71) 1# > nul || set _= ;; set _=(71)/udmdh-basketball.png
splashimage --titlew=48 --animated=0x90=10=6=%PIC_X%=%PIC_Y% %_% || set _=
fat copy %topd%/udm/moveavi (77)/moveavi > nul || set _= ;; insmod (77)/moveavi > nul || set _=
set /a _=%@yresol% - 110 > nul ;; set /a _=%@random% % %_% + 10 > nul ;; set /a __=%@xresol% - 110 > nul ;; set /a __=%@random% % %__% + 10 > nul
set /a _sx=%@random% / 4  % 512 - 255 ;; if %_sx%<=0 set /a _sx=%_sx% - 1 ;; set /a _sy=%@random% / 5 % 512 - 255 ;; if %_sy%<=0 set /a _sy=%_sy% - 128 / 128 * 128 > nul ;; if %_sy%>=1 set /a _sy=%_sy% + 127 / 128 * 128 > nul
splashimage --animated=0x90=*1=6=%__%=%_%:::0x80[$moveavi -fun: 2 %_sx% %_sy% 0 0] %topd%/udm/pic/bubble.png || set _=
set /a _=%@yresol% - 110 > nul ;; set /a _=%@random% % %_% + 10 > nul ;; set /a __=%@xresol% - 110 > nul ;; set /a __=%@random% % %__% + 10 > nul
set /a _sx=%@random% / 3 % 512 - 255 ;; if %_sx%<=0 set /a _sx=%_sx% - 1 ;; set /a _sy=%@random% / 6  % 512 - 255 ;; if %_sy%<=0 set /a _sy=%_sy% - 128 / 128 * 128 > nul ;; if %_sy%>=1 set /a _sy=%_sy% + 127 / 128 * 128 > nul
set p2=bubble.png ;; if exist %topd%/udm/pic/earth.png set p2=earth.png
splashimage --animated=0x90=*1=6=%__%=%_%:::0x80[$moveavi -fun: 2 %_sx% %_sy% 0 0] %topd%/udm/pic/%p2% || set _=
#set /a _=%@yresol% - 110 > nul ;; set /a _=%@random% % %_% + 10 > nul ;; set /a __=%@xresol% - 110 > nul ;; set /a __=%@random% % %__% + 10 > nul
#set /a _sx=%@random% % 4 - 1 ;; if %_sx%<=0 set /a _sx=%_sx% - 1 ;; set /a _sy=%@random% % 4 - 1 ;; if %_sy%<=0 set /a _sy=%_sy% - 1
goto :eof

:chklocsys
ls (hd0,0)/ | call :chksysf=
exit 0
:chksysf
if ""=="%~1" exit 0
if /i "bootmgr"=="%~1" if exist (hd0,0)/windows/system32/control.exe if exist (hd0,0)/boot/bcd set hdldr=bootmgr && goto :eof
if /i "ntldr"=="%~1" if exist (hd0,0)/windows/system32/control.exe if exist (hd0,0)/boot.ini set hdldr=ntldr && goto :eof
shift
goto :chksysf

:getcfg
if exist %topd%/usr_onlyapp.ini set onlyapp=usr_onlyapp.ini
if exist %topd%/udm/usr_onlyapp.ini set onlyapp=udm/usr_onlyapp.ini
if exist %topd%/udm/pic/udmdh.png set udmdh=1
if exist %topd%/udm/HOTKEY set hotkey=1
if exist %topd%/udm/isusb set isusb=1
if exist %topd%/udm/F1.TXT set _f1=1
if exist %topd%/udm/in_theme600x16 set "cmdtheme=call :theme_600x16" && set wallpre=600
if exist %topd%/udm/in_theme800x16 set "cmdtheme=call :theme_800x16" && set wallpre=800
if exist %topd%/udm/in_theme800x24 set "cmdtheme=call :theme_800x24" && set wallpre=800
if exist %topd%/udm/in_theme1024x16 set "cmdtheme=call :theme_1024x16" && set wallpre=1000
if exist %topd%/udm/in_theme1024x24 set "cmdtheme=call :theme_1024x24" && set wallpre=1000
if exist %topd%/udm/in_theme1366x16 set "cmdtheme=call :theme_1366x16" && set wallpre=1366
if exist %topd%/udm/in_theme1366x24 set "cmdtheme=call :theme_1366x24" && set wallpre=1366
if exist %topd%/udm/in_theme1920x24 set "cmdtheme=call :theme_1920x24" && set wallpre=1920
if exist %topd%/udm/in_theme1920x24auto set "cmdtheme=call :in_theme1920x24auto" && set wallpre=1920
if exist %topd%/udm/in_theme1920x16 set "cmdtheme=call :theme_1920x16" && set wallpre=1920
goto :eof

:getwall
set       wall=
#自己添加的放前面,优先。看到自己的设计效果
#checkrange 1:3 calc %h% > nul && if exist %topd%/udm/wallpaper%wallpre%-1-3.jpg && set wall=wallpaper%wallpre%-1-3.jpg && exit 0
#checkrange 4:5 calc %h% > nul && if exist %topd%/udm/wallpaper%wallpre%-4-5.jpg && set wall=wallpaper%wallpre%-4-5.jpg && exit 0
#checkrange 6:7 calc %h% > nul && if exist %topd%/udm/wallpaper%wallpre%-6-7.jpg && set wall=wallpaper%wallpre%-6-7.jpg && exit 0
#checkrange 8:9 calc %h% > nul && if exist %topd%/udm/wallpaper%wallpre%-8-9.jpg && set wall=wallpaper%wallpre%-8-9.jpg && exit 0
#checkrange 10:11 calc %h% > nul && if exist %topd%/udm/wallpaper%wallpre%-10-11.jpg && set wall=wallpaper%wallpre%-10-11.jpg && exit 0
#checkrange 12:13 calc %h% > nul && if exist %topd%/udm/wallpaper%wallpre%-12-13.jpg && set wall=wallpaper%wallpre%-12-13.jpg && exit 0
#checkrange 14:15 calc %h% > nul && if exist %topd%/udm/wallpaper%wallpre%-14-15.jpg && set wall=wallpaper%wallpre%-14-15.jpg && exit 0
#checkrange 16:17 calc %h% > nul && if exist %topd%/udm/wallpaper%wallpre%-16-17.jpg && set wall=wallpaper%wallpre%-16-17.jpg && exit 0
#checkrange 18:19 calc %h% > nul && if exist %topd%/udm/wallpaper%wallpre%-18-19.jpg && set wall=wallpaper%wallpre%-18-19.jpg && exit 0
#checkrange 20:21 calc %h% > nul && if exist %topd%/udm/wallpaper%wallpre%-20-21.jpg && set wall=wallpaper%wallpre%-20-21.jpg && exit 0
#checkrange 22:23 calc %h% > nul && if exist %topd%/udm/wallpaper%wallpre%-22-23.jpg && set wall=wallpaper%wallpre%-22-23.jpg && exit 0
#通用规则放后面
if exist %topd%/udm/wallpaper%wallpre%-%h%.jpg && set wall=wallpaper%wallpre%-%h%.jpg && exit 0
if exist %topd%/udm/wallpaper%wallpre%-%h%-%h%.jpg && set wall=wallpaper%wallpre%-%h%-%h%.jpg && exit 0
if exist %topd%/udm/wallpaper%wallpre%-%ho%.jpg && set wall=wallpaper%wallpre%-%ho%.jpg && exit 0
if exist %topd%/udm/wallpaper%wallpre%-%he%.jpg && set wall=wallpaper%wallpre%-%he%.jpg && exit 0
checkrange 8:19 calc %h% > nul && if exist %topd%/udm/wallpaper%wallpre%-8-19.jpg && set wall=wallpaper%wallpre%-8-19.jpg && exit 0
checkrange 0:7,20:24 calc %h% > nul && if exist %topd%/udm/wallpaper%wallpre%-20-7.jpg && set wall=wallpaper%wallpre%-20-7.jpg && exit 0
if exist %topd%/udm/wallpaper%wallpre%.jpg && set wall=wallpaper%wallpre%.jpg && exit 0
if exist %topd%/udm/wallpaper%h%.jpg && set wall=wallpaper%h%.jpg && exit 0
if exist %topd%/udm/wallpaper%h%-%h%.jpg && set wall=wallpaper%h%-%h%.jpg && exit 0
if exist %topd%/udm/wallpaper%ho%.jpg && set wall=wallpaper%ho%.jpg && exit 0
if exist %topd%/udm/wallpaper%he%.jpg && set wall=wallpaper%he%.jpg && exit 0
checkrange 8:19 calc %h% > nul && if exist %topd%/udm/wallpaper8-19.jpg && set wall=wallpaper8-19.jpg && exit 0
checkrange 0:7,20:24 calc %h% > nul && if exist %topd%/udm/wallpaper20-7.jpg && set wall=wallpaper20-7.jpg && exit 0
if exist %topd%/udm/wallpaper.jpg && set wall=wallpaper.jpg && exit 0
exit 0
#message实际只有一个,兼顾优化下
:getgfx
if exist %topd%/udm/message%wallpre%-%h% && set gfx=message%wallpre%-%h% && exit 0
if exist %topd%/udm/message%wallpre%-%h%-%h% && set gfx=message%wallpre%-%h%-%h% && exit 0
if exist %topd%/udm/message%wallpre%-%ho% && set gfx=message%wallpre%-%ho% && exit 0
if exist %topd%/udm/message%wallpre%-%he% && set gfx=message%wallpre%-%he% && exit 0
if exist %topd%/udm/message%wallpre%-8-19 && checkrange 8:19 calc %h% > nul && set gfx=message%wallpre%8-19 && exit 0
if exist %topd%/udm/message%wallpre%-20-7 && checkrange 0:7,20:24 calc %h% > nul && set gfx=message%wallpre%20-7 && exit 0
if exist %topd%/udm/message%wallpre% && set gfx=message%wallpre% && exit 0
if exist %topd%/udm/message%h% && set gfx=message%wallpre%-%h% && exit 0
if exist %topd%/udm/message%h%-%h% && set gfx=message%wallpre%-%h%-%h% && exit 0
if exist %topd%/udm/message%ho% && set gfx=message%wallpre%-%ho% && exit 0
if exist %topd%/udm/message%he% && set gfx=message%wallpre%-%he% && exit 0
if exist %topd%/udm/message8-19 && checkrange 8:19 calc %h% > nul && set gfx=message%wallpre%8-19 && exit 0
if exist %topd%/udm/message20-7 && checkrange 0:7,20:24 calc %h% > nul && set gfx=message%wallpre%20-7 && exit 0
if exist %topd%/udm/message && set gfx=message%wallpre% && exit 0
exit 0

:theme_common
set _tchars=4 ;; set _mchars=9 ;; set /a _fw=%_fh%/2 > nul ;; set _fh=
if ""=="%udmsfont%" if %_fw%<=8 set udmsfont=%topd%/udm/udmsfont.gz ;; if ""=="%udmsfont%" set udmsfont=--font-high=24 %topd%/udm/udmsfont24.gz
if ""=="%icox%" if %_fw%<=8 set icox=20 ;; if ""=="%icox%" set icox=32
if ""=="%_sp%" if %_fw%<=8 set _sp=6 ;; if ""=="%_sp%" set _sp=10
if "3"=="%bsub%" set udmsfont=%topd%/udm/udmsfont.gz
set _w=%@xresol% ;; set _h=%@yresol% ;; set /a __=%_fw% * 2 - 1 > nul ;; if ""=="%PIC_Y%" set PIC_Y=%__%
set /a __=-%_mchars% * %_fw% + %_w%  - 48 - 8 /2 > nul ;; if ""=="%PIC_X%" set PIC_X=%__%
set /a _=%_w%/%_fw% / 2 > nul ;; if %_%<=40 && set __=8 ! set /a __=%_%/3 > nul ;; if ""=="%_m_box_x%" set _m_box_x=%__%
set /a _=%_fw% * %_m_box_x% - 13 - 10
if not "-dis"=="%_win%" set _win=:wintheme1   %_% ;; set _win_x=%_%
set /a _=%_fw% * 3 *2 -  33 / 2 +3
if not "-dis"=="%_win%" set _win=%_win%  %_%
set /a __= -%_fw% * %_m_box_x% * 2 + %@xresol% + 10
if not "-dis"=="%_win%" set _win=%_win%  %__% ;; set _win_w=%__%
set ___=0 ;; set /a ___=%_win_sp% > nul || set _= ;; if %___%<=0 goto :nosp
#动画帮助框
set /a ___=%_win_w% * %___% / 100 + %_win_x% + 13 + 16
splashimage --helpbox=$2:%___%:*0:-347:-94:%hlpcolr%:%hlpbcolr%:%hlpbord%:%hlpstams%:%hlpchms%:%hlpalpha%:%hlpPalph%:LT || set _=
goto :end_sp
:nosp
splashimage --helpbox=$2:::-1:-1:%hlpcolr%:%hlpbcolr%:%hlpbord%:%hlpstams%:%hlpchms%:%hlpalpha%:%hlpPalph%:LT || set _=
#splashimage --helpbox=$2:::::%hlpcolr%:%hlpbcolr%:%hlpbord%:%hlpstams%:%hlpchms%:%hlpalpha%:%hlpPalph%:LT || set _=
:end_sp
set _= ;; set hlpstams= ;; set hlpchms= ;; set hlpcolr= ;; set hlpbcolr= ;; set hlpbord=
if not ""=="%_win_sp%" set _win_sp=%_win_sp%%% ;; set _win_x= ;; set _win_w= ;; set ___=
set /a _fha= %_fw% * 2 + %_sp% ;; set /a __=%@yresol% /%_fha% - 3 - 6
set /a _= %_fha% * %__% ;; set /a _= %_% + %_fw% + 2
if %_fw%>=12 set /a _= %_% + %_fw% ;; set _fha=
if not "-dis"=="%_win%" set _win=%_win%  %_%
set /a __= %__% - 1
set /a _=%PIC_X% + 48 + 8 > nul ;; if ""=="%_m_str_x%" set _m_str_x=*%_%
set _m_box_x=x=%_m_box_x% w=0 y=3 h=%__%
set fontsp=--font-spacing=0:%_sp% ;; set /a __=%_fw% + 12 > nul ;; if ""=="%_m_str_y%" set _m_str_y=*%__%
set /a _px=%_w%/6 > nul ;; set /a _pw=2 * %_w% / 3 > nul ;; set /a _py=%_h% - 35 > nul
set /a _x=-%_tchars% * %_fw% + %_w% / 2 > nul ;; set /a _h=%_fw% * 2+%_sp% > nul ;; set /a _y=%_py%-1 - %_h% > nul
set /a _w=%_fw% * 9 ;; set /a _=%@xresol% - %_w% - 5 ;;
set "timepbar=--time-pbar=%_px%:%_py%:%_pw%:20:0xFFFFFFFF:0xFFFFFFFF %^2d秒"
set "timexy=--timeout=*%_x%:*%_y%"
set __= ;; set _x= ;; set _y= ;; set _px= ;; set _pw= ;; set _py= ;; set _w= ;; set _h= ;; set _fw= ;; set _sp= ;; set _tchars= ;; set _mchars=
goto :eof

:theme_600x16
if ""=="%gfx%" && if %ch%>=1 && graphicsmode -1 640 480  8:32 || graphicsmode -1 600:799 100:1000  8:32 || graphicsmode -1 100:1000 100:1000 24:32
set _fh=16
#set _win=-dis
goto :theme_common
:theme_800x16
set icox=20
if ""=="%gfx%" && if %ch%>=1 && graphicsmode -1 800 600  8:32 || graphicsmode -1 800:999 100:1000  8:32 || graphicsmode -1 100:1000 100:1000 24:32
set _fh=16
#set _win=-dis
goto :theme_common
:theme_800x24
if ""=="%gfx%" && if %ch%>=1 && graphicsmode -1 800 600  8:32 || graphicsmode -1 800:999 100:1000  8:32 || graphicsmode -1 100:1000 100:1000 24:32
set _fh=24
#set _win=-dis
goto :theme_common
:theme_1024x16
graphicsmode -1 1024 768  8:32 > nul || graphicsmode -1 1366 768  8:32 || graphicsmode -1 1000:2200 700:800  8:32 || graphicsmode -1 100:1000 100:1000 24:32 || set _=
set wallpre=%@xresol% ;; if exist %topd%/udm/wallpaper%wallpre%.jpg || set wallpre=1366
set _fh=16
#set _win=-dis
goto :theme_common
:theme_1024x24
graphicsmode -1 1024 768  8:32 > nul || graphicsmode -1 1366 768  8:32 || graphicsmode -1 1000:2200 700:800  8:32 || graphicsmode -1 100:1000 100:1000 24:32 || set _=
set wallpre=%@xresol% ;; if exist %topd%/udm/wallpaper%wallpre%.jpg || set wallpre=1366
set _fh=24
goto :theme_common
:theme_1366x16
graphicsmode -1 1366 768  8:32 || graphicsmode -1 1024 768  8:32 > nul || graphicsmode -1 1000:2200 700:800  8:32 || graphicsmode -1 100:1000 100:1000 24:32 || set _=
set wallpre=%@xresol% ;; if exist %topd%/udm/wallpaper%wallpre%.jpg || set wallpre=1366
set _fh=16
#set _win=-dis
goto :theme_common
:theme_1366x24
graphicsmode -1 1366 768  8:32 || graphicsmode -1 1024 768  8:32 > nul || graphicsmode -1 1000:2200 700:800  8:32 || graphicsmode -1 100:1000 100:1000 24:32 || set _=
set wallpre=%@xresol% ;; if exist %topd%/udm/wallpaper%wallpre%.jpg || set wallpre=1366
set _fh=24
#set _win=-dis
goto :theme_common
:theme_1920x24
graphicsmode -1 1920 1080  8:32 > nul || graphicsmode -1 1920 100:2000  8:32 || graphicsmode -1 1340:2200 700:2000  8:32 || graphicsmode -1 100:10000 100:10000 24:32 || set _=
set wallpre=%@xresol% ;; if exist %topd%/udm/wallpaper%wallpre%.jpg || set wallpre=1920
set _fh=24
#set _win=-dis
goto :theme_common
:theme_1920x16
graphicsmode -1 1920 1080  8:32 > nul || graphicsmode -1 1920 100:2000  8:32 || graphicsmode -1 1340:2200 700:2000  8:32 || graphicsmode -1 100:10000 100:10000 24:32 || set _=
set wallpre=%@xresol% ;; if exist %topd%/udm/wallpaper%wallpre%.jpg || set wallpre=1920
set _fh=16
goto :theme_common
:in_theme1920x24auto
#set _=autohelp ;; set _fh=16 ;; goto :auto800
:auto1920
graphicsmode -1 1920 1080  8:32 > nul || graphicsmode -1 1920 100:2000  8:32 || graphicsmode -1 1600:-1 700:-1  8:32 || goto :auto1366
set wallpre=%@xresol% ;; if exist %topd%/udm/wallpaper%wallpre%.jpg || set wallpre=1920
set _fh=24 ;; set _win_sp=40 ;; set _=
#set _win=-dis
goto :theme_common
:auto1366
set _=autohelp ;; set _fh=16
graphicsmode -1 1366 768  8:32 > nul || graphicsmode -1 1366 100:2000  8:32 || graphicsmode -1 1300:-1 700:2000  8:32 || goto :auto1024
set wallpre=%@xresol% ;; if exist %topd%/udm/wallpaper%wallpre%.jpg || set wallpre=1366
#set _win=-dis
goto :autolow
:auto1024
graphicsmode -1 1024 768  8:32 > nul || graphicsmode -1 1024 100:2000  8:32 || graphicsmode -1 900:-1 700:2000  8:32 || goto :auto1024
set wallpre=%@xresol% ;; if exist %topd%/udm/wallpaper%wallpre%.jpg || set wallpre=1024
#set _win=-dis
goto :autolow
:auto800
graphicsmode -1 800 600  8:32 > nul || graphicsmode -1 800 100:2000  8:32 || graphicsmode -1 700:-1 700:2000  8:32 || goto :auto1024
set wallpre=%@xresol% ;; if exist %topd%/udm/wallpaper%wallpre%.jpg || set wallpre=800
set _=
#splashimage --helpbox=$2:130:460:-347:-94:%hlpcolr%:%hlpbcolr%:%hlpbord%:%hlpstams%:%hlpchms%:%hlpalpha%:%hlpPalph%:LT || set _=
#set _win=-dis
goto :theme_common
:auto640
graphicsmode -1 640 480  8:32 > nul || graphicsmode -1 640 100:2000  8:32 || graphicsmode -1 600:-1 100:2000  8:32 || graphicsmode -1 -1 -1  8:32 || set _=
set wallpre=%@xresol% ;; if exist %topd%/udm/wallpaper%wallpre%.jpg || set wallpre=640
#set _win=-dis
:autolow
goto :theme_common
:wintheme1
setlocal
set x0=%1 ;; set y0=%2 ;; set w0=%3 ;; set h0=%4 ;; set sp=0
set /a x=%x0% + 13+%sp% > nul
set /a y=%y0% + 33 > nul
splashimage --q --scale --offset=0x80:%x%:%y%:%w0%:%h0%:0x20 %topd%/udm/pic/boot_menu_c.png > nul || set _=
splashimage --q --scale --offset=0x80:%x0%:%y0%:13:33 %topd%/udm/pic/boot_menu_nw.png > nul || set _=
set /a y=%y0% + 33 > nul
splashimage --q --scale --offset=0x80:%x0%:%y%:13:%h0% %topd%/udm/pic/boot_menu_w.png > nul || set _=
set /a y=%y0% + 33 + %h0% > nul
splashimage --q --scale --offset=0x80:%x0%:%y%:18:23 %topd%/udm/pic/boot_menu_sw.png > nul || set _=
set /a x=%x0% + 13+%sp%  > nul
splashimage --q --scale --offset=0x80:%x%:%y0%:%w0%:33 %topd%/udm/pic/boot_menu_n.png > nul || set _=
set /a x=%x0% + 13+%sp%  + %w0% > nul
splashimage --q --scale --offset=0x80:%x%:%y0%:29:33 %topd%/udm/pic/boot_menu_ne.png > nul || set _=
set /a x=%x0% + 13+%sp%  + %w0% > nul
set /a y=%y0% + 33 > nul
splashimage --q --scale --offset=0x80:%x%:%y%:29:%h0% %topd%/udm/pic/boot_menu_e.png > nul || set _=
set /a x=%x0% + 13+%sp%  + %w0% > nul
set /a y=%y0% + 33 + %h0% > nul
splashimage --q --scale --offset=0x80:%x%:%y%:29:23 %topd%/udm/pic/boot_menu_se.png > nul || set _=
set /a x=%x0% + 13+%sp%  > nul
set /a y=%y0% + 33 + %h0% > nul
splashimage --q --scale --offset=0x80:%x%:%y%:%w0%:23 %topd%/udm/pic/boot_menu_s.png > nul || set _=
shift ;; shift ;; shift ;; shift
:WIN_SP
if ""=="%~1" goto :WIN_END
set xs=%~1 ;; set pe=%xs:~-1%
if "%%"=="%pe%" set p=%xs:~0,-1% ;; if "%%"=="%pe%"  set /a xs=%p% * %w0% / 100 > nul
set /a x=%x0% + 13+%sp% + %xs%  > nul ;; set /a y=%y0% + 33 > nul
splashimage --q --scale --offset=0x80:%x%:%y%:13:%h0% %topd%/udm/pic/boot_menu_w.png > nul || set _=
shift ;; goto :WIN_SP
:WIN_END
endlocal
goto :eof
:setwall_win
set wall= && if not ""=="%wall%" && splashimage --wall --q --scale %topd%/udm/%wall% > nul || set _=
#1大窗口
#call :wintheme1 90 60  600 350
#2列小窗口
#call :wintheme1  90 60  270 350
#call :wintheme1 380 60  270 350

#1大窗口分栏
if not ""=="%_win%" if not "-dis"=="%_win%" call %_win% %_win_sp% ;; set _win=
goto :eof
:sethotkey
set /a _x=%@xresol% - 200  > nul ;; set /a _y=%@yresol%  - 50 > nul
splashimage --text=:%_x%:%_y%:80:34::0x5c9651 F9 || set _=
set /a _x=%@font_w% * 2 + %_x%   > nul ;; splashimage --text=:%_x%:%_y%:80:34::0x5c9651 重启 || set _=
#setmenu --hotkey=0x4300 reboot || set _=
setmenu --hotkey=0x4300 splashimage --cmd=reboot --mess=::300:160:0xFFFFFF::40:::0xF0::CV:(76)/udm/pic/helpwin.png ENTER键确认,ESC退出
set /a _x=%@xresol% - 100  > nul ;;
splashimage --text=:%_x%:%_y%:80:34::0x5c9651 F10 || set _=
set /a _x=%@font_w% * 3 + %_x%   > nul ;; splashimage --text=:%_x%:%_y%:80:34::0x5c9651 关机 || set _=
#setmenu --hotkey=0x4400 halt || set _=
setmenu --hotkey=0x4400 splashimage --cmd=halt --mess=::300:160:0xFFFFFF::40:::0xF0::CV:(76)/udm/pic/helpwin.png ENTER键确认,ESC退出
if "1"=="%_f1%" splashimage --text=:50:%_y%:80:34::0x5c9651 F1 || set _=
set /a _x=%@font_w% * 2 + 10   > nul ;; if "1"=="%_f1%" splashimage --text=:65:%_y%:80:34::0x5c9651 帮助 || set _=
set /a _w=509*%@xresol% / 800 ;; set /a _h=415*%@yresol% / 600
setmenu --hotkey=0x3B00 splashimage --mess=::%_w%:%_h%:0xFFFFFF::40:::0xF0::LT:(76)/udm/pic/helpwin.png:/udm/F1.TXT || set _=
set _x= ;; set _y= ;; set _w= ;; set _h=
goto :eof
#0x4300=F9  0x4300=F10

      期待大佬出手,能指点一下,把开头一页显示16个选项和左移标题问题解决。


评分

参与人数 1无忧币 +5 收起 理由
熄灭的火焰 + 5 很给力!

查看全部评分

2#
发表于 2020-4-20 20:24:23 | 只看该作者
给力!
回复

使用道具 举报

3#
发表于 2020-4-21 10:13:25 | 只看该作者
谢谢分享
回复

使用道具 举报

4#
发表于 2021-5-28 08:53:21 | 只看该作者
同问啊,问题解决了吗?
回复

使用道具 举报

5#
发表于 2023-10-13 16:27:32 | 只看该作者
谢谢分享
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-4-25 19:21

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表