|
- TEAM set^ EnviMode=1|set^ ForceLocal=1|set &Wide=666|set &High=212|set$ nl=0d 0a
- set &::EN_CHANGE=0x0300
- set &::WM_KEYDOWN=0x0100
- set &::WM_LBUTTONDOWN=0x0201
- set &::WM_RBUTTONDOWN=0x0204
- set &::WM_LBUTTONDBLCLK=0x0203
- set &::WM_MOUSEENTER=0x1000
- set &::WM_MOUSELEAVE=0x02A3
- set &::WM_DROPFILES=0x0233
- set &::WM_SIZE=0x0005
- set &::SIZE_MAXSHOW=3
- set &::SIZE_MAXIMIZED=2
- set &::SIZE_RESTORED=0
- set &::CBN_HOVER=0x7001
- set &::SB_VERT=1
- set &::SIF_POS=0x0004
- set &::WM_VSCROLL=0x0115
- set &::SB_BOTTOM=7
- set &::EM_GETSEL=0x00B0
- set &::EM_SETSEL=0x00B1
- set &::EM_LINEINDEX=0x00BB
- //DPI缩放比
- CALL $--ret:&DPI_Aware user32.dll,SetProcessDPIAware
- CALL $--ret:&DPI_Aware user32.dll,SetProcessDPIAwareness,#1
- set &hdcNUM=0
- LOOP #1=1,
- {*
- CALL $--ret:&hdc user32.dll,GetDC,#0
- CALC #&hdcNUM=%&hdcNUM%+1
- IFEX $%&hdcNUM%>50, EXIT
- IFEX $%&hdc%>0, EXIT
- WAIT 0.9
- }
- set &ScaleCMD=-scalef -scale
- IFEX $%&hdc%>0,
- {*
- CALL $--ret:&LOGPIXELSX Gdi32.dll,GetDeviceCaps,#%&hdc%,#88
- set &ScaleCMD=-scalef:%&LOGPIXELSX% -scale:%&LOGPIXELSX%
- }
- CALL @WIND
- _SUB WIND,W611H422,批处理脚本,team TIPS -|CALL saveSCRIPT %&saveSCR%,%MyName%,,,-disminb %&ScaleCMD%
- CALL setPOS WIN3
- CALL SETtop
- %&Font_Cmd%
- set &saveSCR=
- MEMO+ -3D &EG1,L5T0W521H360,,,
- set n=0
- forx* 隐藏运行 快捷方式 关联右键 自我删除,i,
- { ^CHEK %i%,L526T%n%W66H18,%i%,call BAT,
- calc n=%n%+20
- }
- LABE B,L5T362W100H16,空
- set @&EG1.MSG=0x00BB:set @B=换行 //捕获鼠标进入 事件, 执行命令
-
- LABE -left &BG1,L5T378W80H16,提示:支持拖入,,0xDF0029
- ITEM &IG1,L221T368W50H25,重载,team CALL reloadSCRIPT|MESS=+icon1 刷新成功! @提示#OK*5000
- ITEM &IG2,L271T368W50H25,清空,set @&EG1=,
- ITEM &IG3,L321T368W50H25,浏览,CALL viewWCS,
- ITEM &IG4,L371T368W50H25,新增,team set &saveSCR=B|KILL \,
- ITEM &IG5,L421T368W50H25,保存,team set &saveSCR=A|KILL \,
- ITEM &IG6,L471T368W50H25,取消,KILL \,
- set @this.Visible=1
- WAIT 0.9
- CALL Cursor &IG1 &IG2 &IG3 &IG4 &IG5 &IG6
- CALL reloadBAT
- set @&EG1.MSG=0x0233::&wp,&lp, CALL getBG1 "%&wp%" "%&lp%"
- set @&BG1.MSG=0x1000: CALL Mouse_In 支持拖入
- CALL Mouse_Out &BG1
-
- _END
- _SUB BAT
- set @&EG1.Val=?a
- find $%隐藏运行.Check%=1,set @&EG1=%a%%nl%%%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
- find $%快捷方式.Check%=1,set @&EG1=%a%%nl%mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\iBAT.lnk""):b.TargetPath=""%~dp0iBAT.exe"":b.WorkingDirectory=""%~dp0"":b.Save:close")
- find $%关联右键.Check%=1,set @&EG1=%a%%nl%for %%%%i in (bat cmd)do (%nl%reg add "HKCR\SystemFileAssociations\.%%%%i\shell\iBAT" /t REG_SZ /d "用iBAT打开" /f%nl%reg add "HKCR\SystemFileAssociations\.%%%%i\shell\iBAT" /v Icon /t REG_SZ /d "%~dp0iBAT.exe" /f%nl%reg add "HKCR\SystemFileAssociations\.%%%%i\shell\iBAT\command" /t REG_SZ /d "%~dp0iBAT.exe ""%%%%1" /f%nl%)
- find $%自我删除.Check%=1,set @&EG1=%a%%nl%(echo for %%%%%%%%i in ^(bat cmd^)do reg delete "HKCR\SystemFileAssociations\.%%%%%%%%i\shell\iBAT" /f%nl%echo taskkill /f /im iBAT.exe /t^&TIMEOUT /T 1 /NOBREAK^&del "%%%%userprofile%%%%\desktop\iBAT.lnk"^&cd..^&rd/s/q "%%%%~dp0")>"%~dp0卸载.bat"
- _END
- _SUB reloadBAT
- set &noEG1=
- set @&TABLA.Sel=?&SEL
- ifex $%&SEL%>0,
- {*
- set @&TABLA.Val=?%&SEL%.1;&scriptNAME
- FEXT &sEXT=%&scriptNAME%
- FIND $%&sEXT%=,
- {*
- set @&BG1=%&scriptNAME%
- ^set @&EG1=%%%&scriptNAME%%%
- }!
- {*
- set &noEG1=1
- }
- }!
- {*
- set &noEG1=1
- }
- ifex $%&noEG1%=1,set @&EG1=@Echo off&SetLocal EnableDelayedExpansion
- _END
- _SUB 写入
- set 写入=WRIT-ANSI "D:\软件\iBAT\12.bat"
- %写入%,1,@echo off&%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
- %写入%,2,mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\iBAT.lnk""):b.TargetPath=""%~dp0iBAT.exe"":b.WorkingDirectory=""%~dp0"":b.Save:close")
- %写入%,3,for %%i in (bat cmd)do (
- %写入%,4, reg add "HKCR\SystemFileAssociations\.%%i\shell\iBAT" /t REG_SZ /d "用iBAT打开" /f
- %写入%,5, reg add "HKCR\SystemFileAssociations\.%%i\shell\iBAT" /v Icon /t REG_SZ /d "%~dp0iBAT.exe" /f
- %写入%,6, reg add "HKCR\SystemFileAssociations\.%%i\shell\iBAT\command" /t REG_SZ /d "%~dp0iBAT.exe ""%%1" /f
- %写入%,7,)
- _END
复制代码
请教一下 能写个在编辑框指定行 或者获取光标位置 写入指定字符 的示例吗 |
|