'昨天看了namejm的读心术批处理版,就模仿写了一个,一定有很多不是的地方,还请指正。
msgbox " 从10~99之间任意选择一个数,把这个数的十位与个位相加,再把任意选择的数减去这个和。" & chr(13) & chr(10) & "例如:你选的数是23,然后2+3=5,然后23-5=18,在图表中找出与差值对应的符号,并把这个符" & chr(13) & chr(10) & "号牢记心中,然后进入下一步,你会发现:显示出来的符号就是你刚刚心里记下的那个符号。",,"读心术—VBS版"
do until tuichu=vbno
dim a,fuhao,MyFile,fu
set fso=createobject("scripting.filesystemobject")
randomize
set ws=createobject("wscript.shell")
for i=99 to 0 step -1
if i=99 then call aa()
a=int(rnd()*32+1)
if a=1 then
fuhao="☆"
elseif a=2 then
fuhao="★"
elseif a=3 then
fuhao="○"
elseif a=4 then
fuhao="●"
elseif a=5 then
fuhao="◎"
elseif a=6 then
fuhao="◇"
elseif a=7 then
fuhao="◆"
elseif a=8 then
fuhao="□"
elseif a=9 then
fuhao="■"
elseif a=10 then
fuhao="△"
elseif a=11 then
fuhao="▲"
elseif a=12 then
fuhao="※"
elseif a=13 then
fuhao="→"
elseif a=14 then
fuhao="←"
elseif a=15 then
fuhao="↑"
elseif a=16 then
fuhao="↓"
elseif a=17 then
fuhao="〓"
elseif a=18 then
fuhao="@"
elseif a=19 then
fuhao="〖"
elseif a=20 then
fuhao="〗"
elseif a=21 then
fuhao="【"
elseif a=22 then
fuhao="】"
elseif a=23 then
fuhao="『"
elseif a=24 then
fuhao="』"
elseif a=25 then
fuhao="≈"
elseif a=26 then
fuhao="≡"
elseif a=27 then
fuhao="∑"
elseif a=28 then
fuhao="∈"
elseif a=29 then
fuhao="⊙"
elseif a=30 then
fuhao="∵"
elseif a=31 then
fuhao="∴"
elseif a=32 then
fuhao="¤"
end if
if i>=0 and i<=9 then i=i & " "
if i=9 or i=18 or i= 27 or i=36 or i=45 or i=54 or i=63 or i=72 or i=81 then fuhao=fu
b=i &" " & fuhao & " "& b
if i=90 or i=80 or i=70 or i=60 or i=50 or i=40 or i=30 or i=20 or i=10 then
b= chr(13) & chr(10) & b
end if
next
msgbox b,,"读心术—请牢记你选择的符号"
tuichu=msgbox ("你选择的符号是:" & fu & chr(13)& chr(10)& "还要再试一次吗?",vbyesno+48+4096,"读心术—提示")
b=""
loop
sub aa()
a=int(rnd()*32+1)
if a=1 then
fu="☆"
elseif a=2 then
fu="★"
elseif a=3 then
fu="○"
elseif a=4 then
fu="●"
elseif a=5 then
fu="◎"
elseif a=6 then
fu="◇"
elseif a=7 then
fu="◆"
elseif a=8 then
fu="□"
elseif a=9 then
fu="■"
elseif a=10 then
fu="△"
elseif a=11 then
fu="▲"
elseif a=12 then
fu="※"
elseif a=13 then
fu="→"
elseif a=14 then
fu="←"
elseif a=15 then
fu="↑"
elseif a=16 then
fu="↓"
elseif a=17 then
fu="〓"
elseif a=18 then
fu="@"
elseif a=19 then
fu="〖"
elseif a=20 then
fu="〗"
elseif a=21 then
fu="【"
elseif a=22 then
fu="】"
elseif a=23 then
fu="『"
elseif a=24 then
fu="』"
elseif a=25 then
fu="≈"
elseif a=26 then
fu="≡"
elseif a=27 then
fu="∑"
elseif a=28 then
fu="∈"
elseif a=29 then
fu="⊙"
elseif a=30 then
fu="∵"
elseif a=31 then
fu="∴"
elseif a=32 then
fu="¤"
end if
end sub
──────────────── 版务记录 ────────────────
执行:namejm
说明:应楼主的要求,帮楼主张贴代码部分,其余部分一字未改。
──────────────── 版务记录 ────────────────
Last edited by namejm on 2006-12-22 at 08:26 AM ]
I watched namejm's batch version of the mind-reading technique yesterday, and I imitated it to write one. There must be many imperfections. Please point out any mistakes.
msgbox " Choose any number from 10 to 99. Add the tens digit and the units digit of this number, then subtract this sum from the chosen number. " & chr(13) & chr(10) & "For example: If you choose the number 23, then 2 + 3 = 5, then 23 - 5 = 18. Find the symbol corresponding to the difference in the chart, and keep that symbol in mind. Then proceed to the next step, and you will find that the displayed symbol is the one you just kept in mind.",,"Mind Reading Technique—VBS Version"
do until tuichu=vbno
dim a,fuhao,MyFile,fu
set fso=createobject("scripting.filesystemobject")
randomize
set ws=createobject("wscript.shell")
for i=99 to 0 step -1
if i=99 then call aa()
a=int(rnd()*32+1)
if a=1 then
fuhao="☆"
elseif a=2 then
fuhao="★"
elseif a=3 then
fuhao="○"
elseif a=4 then
fuhao="●"
elseif a=5 then
fuhao="◎"
elseif a=6 then
fuhao="◇"
elseif a=7 then
fuhao="◆"
elseif a=8 then
fuhao="□"
elseif a=9 then
fuhao="■"
elseif a=10 then
fuhao="△"
elseif a=11 then
fuhao="▲"
elseif a=12 then
fuhao="※"
elseif a=13 then
fuhao="→"
elseif a=14 then
fuhao="←"
elseif a=15 then
fuhao="↑"
elseif a=16 then
fuhao="↓"
elseif a=17 then
fuhao="〓"
elseif a=18 then
fuhao="@"
elseif a=19 then
fuhao="〖"
elseif a=20 then
fuhao="〗"
elseif a=21 then
fuhao="【"
elseif a=22 then
fuhao="】"
elseif a=23 then
fuhao="『"
elseif a=24 then
fuhao="』"
elseif a=25 then
fuhao="≈"
elseif a=26 then
fuhao="≡"
elseif a=27 then
fuhao="∑"
elseif a=28 then
fuhao="∈"
elseif a=29 then
fuhao="⊙"
elseif a=30 then
fuhao="∵"
elseif a=31 then
fuhao="∴"
elseif a=32 then
fuhao="¤"
end if
if i>=0 and i<=9 then i=i & " "
if i=9 or i=18 or i= 27 or i=36 or i=45 or i=54 or i=63 or i=72 or i=81 then fuhao=fu
b=i &" " & fuhao & " "& b
if i=90 or i=80 or i=70 or i=60 or i=50 or i=40 or i=30 or i=20 or i=10 then
b= chr(13) & chr(10) & b
end if
next
msgbox b,,"Mind Reading Technique—Please keep your chosen symbol in mind"
tuichu=msgbox ("The symbol you chose is:" & fu & chr(13)& chr(10)& "Do you want to try again?",vbyesno+48+4096,"Mind Reading Technique—Prompt")
b=""
loop
sub aa()
a=int(rnd()*32+1)
if a=1 then
fu="☆"
elseif a=2 then
fu="★"
elseif a=3 then
fu="○"
elseif a=4 then
fu="●"
elseif a=5 then
fu="◎"
elseif a=6 then
fu="◇"
elseif a=7 then
fu="◆"
elseif a=8 then
fu="□"
elseif a=9 then
fu="■"
elseif a=10 then
fu="△"
elseif a=11 then
fu="▲"
elseif a=12 then
fu="※"
elseif a=13 then
fu="→"
elseif a=14 then
fu="←"
elseif a=15 then
fu="↑"
elseif a=16 then
fu="↓"
elseif a=17 then
fu="〓"
elseif a=18 then
fu="@"
elseif a=19 then
fu="〖"
elseif a=20 then
fu="〗"
elseif a=21 then
fu="【"
elseif a=22 then
fu="】"
elseif a=23 then
fu="『"
elseif a=24 then
fu="』"
elseif a=25 then
fu="≈"
elseif a=26 then
fu="≡"
elseif a=27 then
fu="∑"
elseif a=28 then
fu="∈"
elseif a=29 then
fu="⊙"
elseif a=30 then
fu="∵"
elseif a=31 then
fu="∴"
elseif a=32 then
fu="¤"
end if
end sub
──────────────── Moderation Record ────────────────
Performed by: namejm
Description: At the owner's request, helped the owner post the code part, and the rest remains unchanged.
──────────────── Moderation Record ────────────────
Last edited by namejm on 2006-12-22 at 08:26 AM ]