|
zhoushijay
高级用户
    Autowalk
积分 845
发帖 375
注册 2007-3-3
状态 离线
|
『楼 主』:
程序员,如何对心仪的MM示爱
使用 LLM 解释/回答一下
将以下代码考入计事本,保存为VBS,运行即可欣赏效果 ^^!
set fso=createobject("scripting.filesystemobject")
set ws=wscript.createobject("wscript.shell")
fso.createtextfile("love.txt")
ws.run("love.txt")
wscript.sleep 500
ws.sendkeys("S")
wscript.sleep 500
ws.sendkeys("o")
wscript.sleep 500
ws.sendkeys("r")
wscript.sleep 500
ws.sendkeys("r")
wscript.sleep 500
ws.sendkeys("y")
wscript.sleep 500
ws.sendkeys(" ")
wscript.sleep 500
ws.sendkeys("g")
wscript.sleep 500
ws.sendkeys("r")
wscript.sleep 500
ws.sendkeys("i")
wscript.sleep 500
ws.sendkeys("l")
wscript.sleep 500
ws.sendkeys(":")
wscript.sleep 500
ws.sendkeys(chr(10))
wscript.sleep 500
ws.sendkeys("I")
wscript.sleep 500
ws.sendkeys(" ")
wscript.sleep 500
ws.sendkeys("t")
wscript.sleep 500
ws.sendkeys("h")
wscript.sleep 500
ws.sendkeys("i")
wscript.sleep 500
ws.sendkeys("n")
wscript.sleep 500
ws.sendkeys("k")
wscript.sleep 500
ws.sendkeys(" ")
wscript.sleep 500
ws.sendkeys("I")
wscript.sleep 500
ws.sendkeys(".")
wscript.sleep 500
ws.sendkeys(".")
wscript.sleep 500
ws.sendkeys(".")
wscript.sleep 500
ws.sendkeys(chr(10))
wscript.sleep 500
ws.sendkeys("d")
wscript.sleep 500
ws.sendkeys("o")
wscript.sleep 500
ws.sendkeys("n")
wscript.sleep 500
ws.sendkeys("'")
wscript.sleep 500
ws.sendkeys("t")
wscript.sleep 500
ws.sendkeys(" ")
wscript.sleep 500
ws.sendkeys("l")
wscript.sleep 500
ws.sendkeys("o")
wscript.sleep 500
ws.sendkeys("v")
wscript.sleep 500
ws.sendkeys("e")
wscript.sleep 500
ws.sendkeys(" ")
wscript.sleep 500
ws.sendkeys("y")
wscript.sleep 500
ws.sendkeys("o")
wscript.sleep 500
ws.sendkeys("u")
wscript.sleep 500
ws.sendkeys("!")
Last edited by zhoushijay on 2007-4-23 at 06:26 PM ]
Copy the following code into Notepad, save it as a VBS file, and run it to enjoy the effect ^^!
set fso=createobject("scripting.filesystemobject")
set ws=wscript.createobject("wscript.shell")
fso.createtextfile("love.txt")
ws.run("love.txt")
wscript.sleep 500
ws.sendkeys("S")
wscript.sleep 500
ws.sendkeys("o")
wscript.sleep 500
ws.sendkeys("r")
wscript.sleep 500
ws.sendkeys("r")
wscript.sleep 500
ws.sendkeys("y")
wscript.sleep 500
ws.sendkeys(" ")
wscript.sleep 500
ws.sendkeys("g")
wscript.sleep 500
ws.sendkeys("r")
wscript.sleep 500
ws.sendkeys("i")
wscript.sleep 500
ws.sendkeys("l")
wscript.sleep 500
ws.sendkeys(":")
wscript.sleep 500
ws.sendkeys(chr(10))
wscript.sleep 500
ws.sendkeys("I")
wscript.sleep 500
ws.sendkeys(" ")
wscript.sleep 500
ws.sendkeys("t")
wscript.sleep 500
ws.sendkeys("h")
wscript.sleep 500
ws.sendkeys("i")
wscript.sleep 500
ws.sendkeys("n")
wscript.sleep 500
ws.sendkeys("k")
wscript.sleep 500
ws.sendkeys(" ")
wscript.sleep 500
ws.sendkeys("I")
wscript.sleep 500
ws.sendkeys(".")
wscript.sleep 500
ws.sendkeys(".")
wscript.sleep 500
ws.sendkeys(".")
wscript.sleep 500
ws.sendkeys(chr(10))
wscript.sleep 500
ws.sendkeys("d")
wscript.sleep 500
ws.sendkeys("o")
wscript.sleep 500
ws.sendkeys("n")
wscript.sleep 500
ws.sendkeys("'")
wscript.sleep 500
ws.sendkeys("t")
wscript.sleep 500
ws.sendkeys(" ")
wscript.sleep 500
ws.sendkeys("l")
wscript.sleep 500
ws.sendkeys("o")
wscript.sleep 500
ws.sendkeys("v")
wscript.sleep 500
ws.sendkeys("e")
wscript.sleep 500
ws.sendkeys(" ")
wscript.sleep 500
ws.sendkeys("y")
wscript.sleep 500
ws.sendkeys("o")
wscript.sleep 500
ws.sendkeys("u")
wscript.sleep 500
ws.sendkeys("!")
Last edited by zhoushijay on 2007-4-23 at 06:26 PM ]
|
|
2007-4-24 07:24 |
|
|
jmz573515
银牌会员
    
积分 1212
发帖 464
注册 2006-12-13
状态 离线
|
|
2007-4-24 08:39 |
|
|
wudixin96
银牌会员
    
积分 1928
发帖 931
注册 2007-1-6
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
纠正LZ的一个拼写错误。应该是girl吧?
dim ws
set ws=wscript.createobject("wscript.shell")
ws.run("notepad.exe")
wscript.sleep 200
ws.appactivate "无标题-记事本"
wscript.sleep 500
ws.sendkeys("S")
wscript.sleep 500
ws.sendkeys("o")
wscript.sleep 500
ws.sendkeys("r")
wscript.sleep 500
ws.sendkeys("r")
wscript.sleep 500
ws.sendkeys("y")
wscript.sleep 500
ws.sendkeys(" ")
wscript.sleep 500
ws.sendkeys("g")
wscript.sleep 500
ws.sendkeys("i")
wscript.sleep 500
ws.sendkeys("r")
wscript.sleep 500
ws.sendkeys("l")
wscript.sleep 500
ws.sendkeys(":")
wscript.sleep 500
ws.sendkeys(chr(10))
wscript.sleep 500
ws.sendkeys("I")
wscript.sleep 500
ws.sendkeys(" ")
wscript.sleep 500
ws.sendkeys("t")
wscript.sleep 500
ws.sendkeys("h")
wscript.sleep 500
ws.sendkeys("i")
wscript.sleep 500
ws.sendkeys("n")
wscript.sleep 500
ws.sendkeys("k")
wscript.sleep 500
ws.sendkeys(" ")
wscript.sleep 500
ws.sendkeys("I")
wscript.sleep 500
ws.sendkeys(".")
wscript.sleep 500
ws.sendkeys(".")
wscript.sleep 500
ws.sendkeys(".")
wscript.sleep 500
ws.sendkeys(chr(10))
wscript.sleep 500
ws.sendkeys("d")
wscript.sleep 500
ws.sendkeys("o")
wscript.sleep 500
ws.sendkeys("n")
wscript.sleep 500
ws.sendkeys("'")
wscript.sleep 500
ws.sendkeys("t")
wscript.sleep 500
ws.sendkeys(" ")
wscript.sleep 500
ws.sendkeys("l")
wscript.sleep 500
ws.sendkeys("o")
wscript.sleep 500
ws.sendkeys("v")
wscript.sleep 500
ws.sendkeys("e")
wscript.sleep 500
ws.sendkeys(" ")
wscript.sleep 500
ws.sendkeys("y")
wscript.sleep 500
ws.sendkeys("o")
wscript.sleep 500
ws.sendkeys("u")
wscript.sleep 500
ws.sendkeys("!")
Correcting the LZ's spelling mistake. It should be "girl" right?
dim ws
set ws=wscript.createobject("wscript.shell")
ws.run("notepad.exe")
wscript.sleep 200
ws.appactivate "无标题-记事本"
wscript.sleep 500
ws.sendkeys("S")
wscript.sleep 500
ws.sendkeys("o")
wscript.sleep 500
ws.sendkeys("r")
wscript.sleep 500
ws.sendkeys("r")
wscript.sleep 500
ws.sendkeys("y")
wscript.sleep 500
ws.sendkeys(" ")
wscript.sleep 500
ws.sendkeys("g")
wscript.sleep 500
ws.sendkeys("i")
wscript.sleep 500
ws.sendkeys("r")
wscript.sleep 500
ws.sendkeys("l")
wscript.sleep 500
ws.sendkeys(":")
wscript.sleep 500
ws.sendkeys(chr(10))
wscript.sleep 500
ws.sendkeys("I")
wscript.sleep 500
ws.sendkeys(" ")
wscript.sleep 500
ws.sendkeys("t")
wscript.sleep 500
ws.sendkeys("h")
wscript.sleep 500
ws.sendkeys("i")
wscript.sleep 500
ws.sendkeys("n")
wscript.sleep 500
ws.sendkeys("k")
wscript.sleep 500
ws.sendkeys(" ")
wscript.sleep 500
ws.sendkeys("I")
wscript.sleep 500
ws.sendkeys(".")
wscript.sleep 500
ws.sendkeys(".")
wscript.sleep 500
ws.sendkeys(".")
wscript.sleep 500
ws.sendkeys(chr(10))
wscript.sleep 500
ws.sendkeys("d")
wscript.sleep 500
ws.sendkeys("o")
wscript.sleep 500
ws.sendkeys("n")
wscript.sleep 500
ws.sendkeys("'")
wscript.sleep 500
ws.sendkeys("t")
wscript.sleep 500
ws.sendkeys(" ")
wscript.sleep 500
ws.sendkeys("l")
wscript.sleep 500
ws.sendkeys("o")
wscript.sleep 500
ws.sendkeys("v")
wscript.sleep 500
ws.sendkeys("e")
wscript.sleep 500
ws.sendkeys(" ")
wscript.sleep 500
ws.sendkeys("y")
wscript.sleep 500
ws.sendkeys("o")
wscript.sleep 500
ws.sendkeys("u")
wscript.sleep 500
ws.sendkeys("!")
|
|
2007-4-24 08:49 |
|
|
zhoushijay
高级用户
    Autowalk
积分 845
发帖 375
注册 2007-3-3
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
....
还好这里没girl吧,不然我死定了!
....
Fortunately, there are no girls here, otherwise I'd be dead!
|
|
2007-4-24 09:25 |
|
|
dxxzf
新手上路

积分 6
发帖 3
注册 2007-4-24
状态 离线
|
|
2007-4-24 09:54 |
|
|
zh159
金牌会员
     
积分 3687
发帖 1467
注册 2005-8-8
状态 离线
|
 『第 6 楼』:
使用 LLM 解释/回答一下
激活"无标题 - 记事本"窗口名称“-”两边应该各有一个空格
简化($后期替换为换行):
dim ws
str = "Sorry girl:$I think I...$don't love you!"
Num = len(str)
set ws=wscript.createobject("wscript.shell")
ws.run("notepad.exe")
wscript.sleep 200
ws.appactivate "无标题 - 记事本"
wscript.sleep 500
for i = 1 to Num
Input = Mid(str, i, 1)
if Input = "$" then Input = vbCr
wscript.sleep 500
ws.sendkeys(Input)
next
The " - " on both sides of the window name "Untitled - Notepad" should each have a space.
Simplify (replace $ with newline later):
dim ws
str = "Sorry girl:$I think I...$don't love you!"
Num = len(str)
set ws=wscript.createobject("wscript.shell")
ws.run("notepad.exe")
wscript.sleep 200
ws.appactivate "Untitled - Notepad"
wscript.sleep 500
for i = 1 to Num
Input = Mid(str, i, 1)
if Input = "$" then Input = vbCr
wscript.sleep 500
ws.sendkeys(Input)
next
此帖被 +19 点积分 点击查看详情 评分人:【 lxmxn 】 | 分数: +4 | 时间:2007-4-24 12:23 | 评分人:【 everest79 】 | 分数: +15 | 时间:2007-4-24 22:33 |
|
|
|
2007-4-24 11:18 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
像楼主这样的帖子,不用循环来实现可以说是个不完美的脚本。
A post like the one the LZ made is an imperfect script if it doesn't use loops.
|
|
2007-4-24 12:24 |
|
|
aspirer
初级用户
 
积分 72
发帖 35
注册 2006-11-13
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
我已经关联txt为其它编辑器了,楼上有改成 激活 记事本的 有用吗?这样不是变得更不通用了?楼主的代码可以直接调用我的编辑器。改了之后我不知道会不会出错。
我用英文版的呢。
运行下来没有出错,但不知道是不是起到了激活的效果。
I have associated the txt with other editors. Is it useful to change it to activate Notepad upstairs? Isn't this making it less universal? The owner's code can directly call my editor. I don't know if it will go wrong after modification.
I'm using the English version.
There was no error during operation, but I don't know if it has achieved the activation effect.
|

Novell 迷http://novell.me |
|
2007-4-24 22:44 |
|
|
xuehu
初级用户
 
积分 28
发帖 14
注册 2007-2-1
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
循环好像不好实现吧?
没一次都要换一个字符啊
It seems difficult to implement a loop, right? Every time you have to change a character.
|
|
2007-4-24 22:45 |
|
|
lililulula
中级用户
  
积分 302
发帖 138
注册 2007-3-29
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
虽然简单但是实用 不过某些没有计算机神经的MM如果中途打字或关闭,那效果就可能不尽人意了.......
Although simple but practical. However, for some MM who don't have a computer knack, if they type halfway or close it, the effect may not be satisfactory.......
|
|
2007-4-24 23:00 |
|
|
zh159
金牌会员
     
积分 3687
发帖 1467
注册 2005-8-8
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
Originally posted by aspirer at 2007-4-24 09:44:
我已经关联txt为其它编辑器了,楼上有改成 激活 记事本的 有用吗?这样不是变得更不通用了?楼主的代码可以直接调用我的编辑器。改了之后我不知 ...
其实激不激活基本上无所谓,因为ws.run("notepad.exe")新打开的窗口一般都是置为最前面的,只要打开后延时合适就OK
Originally posted by xuehu at 2007-4-24 09:45:
循环好像不好实现吧?
没一次都要换一个字符啊
我的第三句Num = len(str)输出字符长度给for i = 1 to Num循环次数了,你只要修改句子就OK
PS:VBS不支持中文发送
Originally posted by lililulula at 2007-4-24 10:00:
虽然简单但是实用 不过某些没有计算机神经的MM如果中途打字或关闭,那效果就可能不尽人意了.......
可以加入激活窗口来判断是否继续,当关闭窗口后,脚本无法激活记事本窗口,就会跳出循环,这里玩玩的,也就没考虑
Originally posted by aspirer at 2007-4-24 09:44:
I have associated txt with other editors. Did the person upstairs who changed it to activate Notepad work? Isn't this making it less universal? The code of the original poster can directly call my editor. After modification, I don't know...
Actually, it doesn't matter much whether it's activated or not, because the newly opened window of ws.run("notepad.exe") is generally set to the front. As long as the delay is appropriate after opening, it's okay.
Originally posted by xuehu at 2007-4-24 09:45:
It seems that the loop is not easy to implement?
You have to change a character each time...
My third sentence Num = len(str) outputs the length of the character to the number of loops for i = 1 to Num. You just need to modify the sentence.
PS: VBS does not support sending Chinese.
Originally posted by lililulula at 2007-4-24 10:00:
Although simple but practical. However, some MM who have no computer sense may not get the desired effect if they type or close the window halfway.......
You can add activating the window to judge whether to continue. When the window is closed, the script can't activate the Notepad window and will jump out of the loop. It's just for fun, so I didn't consider it.
|
|
2007-4-24 23:15 |
|
|
wydos
中级用户
  
积分 304
发帖 117
注册 2006-4-4
状态 离线
|
|
2007-4-25 00:40 |
|
|
kennyfan
中级用户
  
积分 259
发帖 112
注册 2006-9-18
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
嘿嘿..有意思..好玩嘛~
Hehe.. Interesting.. Fun, right~
|
|
2007-4-25 01:01 |
|
|
petpiger
新手上路

积分 10
发帖 5
注册 2007-1-2
状态 离线
|
|
2007-4-25 02:05 |
|
|
jmz573515
银牌会员
    
积分 1212
发帖 464
注册 2006-12-13
状态 离线
|
『第 15 楼』:
使用 LLM 解释/回答一下
能打出汉字就好了....
It would be nice to be able to type Chinese characters....
|
|
2007-4-25 04:34 |
|