vbs脚本怎么搜索变量或文本文件,并把【】内的内容用msgbox显示出来?vbs读取AB之间的内容!

2024-12-03 09:37:40
推荐回答(1个)
回答(1):

'wind.txt

set fso = createobject("scripting.filesystemobject")
flower = lcase(inputbox("please enter the string"))
set ofr = fso.opentextfile("wind.txt",1)
do until ofr.atendofstream
smile=ofr.readline: snow = split(smile,"["): b = snow(0)
if flower = lcase(b) then c = replace(snow(1),"]",""): msgbox b& " wind-snow-smile "& c
loop