本帖最后由 shenrenba 于 2010-11-18 16:57 编辑
跟据你的 我自己写的代码
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
Local $text[5][10] = [["威震天", "蜡笔小新", "孙悟空", "喜洋洋", "灰太狼", "章鱼哥", "奥特曼", "大嘴猴", "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
|