微博搞笑一则
新浪微博上的,右图的代码是:
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 418, 119, 563, 237)
$Input = GUICtrlCreateInput("", 40, 16, 121, 21)
GUICtrlSetLimit(-1, 5)
$output = GUICtrlCreateInput("", 40, 56, 297, 21)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Global $keys
$sent=""
Global $p=""
Local $m=1
MsgBox(0,"纯属娱乐","输入QQ后五位数,它的含义是。。。")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
If $p<>GUICtrlRead($input) Then
$p=GUICtrlRead($input)
change()
EndIf
WEnd
Func change()
$array = StringSplit(GUICtrlRead($input), "", 2)
For $a In $array
$word=IniRead("1.ini", $m, $a, 0)
$sent=$sent & $word
$m=$m+1
Next
GUICtrlSetData($output,$sent)
$m = 1
$sent = ""
EndFunc
ini文件在附件里 呵呵有意思,顶楼主的学习精神 {:face (84):}楼主这个有创意 呵呵 太有趣了 没有我的有意思啊 哈哈。都很搞笑啊。我顶 我去,
小沈阳在飞机上猴急地舔兽兽 本帖最后由 shenrenba 于 2010-11-18 16:57 编辑
跟据你的 我自己写的代码
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
Local $text = [["威震天", "蜡笔小新", "孙悟空", "喜洋洋", "灰太狼", "章鱼哥", "奥特曼", "大嘴猴", "QQ企鹅", "小沈阳"],["在飞机上", "在动物园", "在公交车上", "在火星", _
"在厕所", "在浴缸里", "在书桌上", "在厨房", "在床上", "在殡仪馆里"],["含蓄的", "默默的", "偷偷摸摸的", "正大光明的", "无语的", "悄无声息的", "猴急的", _
"暴虐的", "温柔的", "疯狂的"],["舔", "抓", "咬", "啃", "吃", "搂", "亲", "玩", "揍", "摸"],["七仔", "凤姐", "林黛玉", "苍井空", "HELLO KITY", "樱桃小丸子", _
"iPhone", "美羊羊", "兽兽", "二奶"]]
$Form1 = GUICreate("微博搞笑一则", 418, 119)
$Input = GUICtrlCreateInput("", 40, 16, 121, 21, $ES_NUMBER)
GUICtrlSetLimit(-1, 5)
$output = GUICtrlCreateInput("", 40, 56, 297, 21)
GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState()
Opt("PixelCoordMode", 2)
GUICtrlSetBkColor($output, PixelGetColor(60, 20, $Form1))
#EndRegion ### END Koda GUI section ###
While 1
put()
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func put()
$out = ""
$nr = GUICtrlRead($Input)
$sr = StringRegExp($nr, "\d", 3)
For $i = 0 To UBound($sr) - 1
$temp = $sr[$i]
$out &= $text[$i][$temp]
Next
GUICtrlSetData($output, $out)
EndFunc ;==>put
谢谢蜘蛛抱蛋 分享 好,我也拿来修改一下
全部都不认识的! 支持搂主的学习精神!
页:
[1]