蜘蛛抱蛋 发表于 2010-11-16 22:30:21

微博搞笑一则


新浪微博上的,右图的代码是:
#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文件在附件里

t87564833 发表于 2010-11-16 23:44:00

呵呵有意思,顶楼主的学习精神

左手猫头鹰 发表于 2010-11-17 00:00:41

{:face (84):}楼主这个有创意

haodd 发表于 2010-11-17 09:35:04

呵呵 太有趣了

31408177 发表于 2010-11-17 13:07:29

没有我的有意思啊

chenronting 发表于 2010-11-17 18:40:17

哈哈。都很搞笑啊。我顶

awfymwvf 发表于 2010-11-18 15:54:51

我去,
小沈阳在飞机上猴急地舔兽兽

shenrenba 发表于 2010-11-18 16:45:05

本帖最后由 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

zhongzijie 发表于 2010-11-21 00:50:58

谢谢蜘蛛抱蛋 分享

jianganew 发表于 2010-11-21 08:22:32

好,我也拿来修改一下

天堂泪吻泪 发表于 2010-11-22 23:22:06


全部都不认识的!

yiruirui 发表于 2010-11-23 09:17:54

支持搂主的学习精神!
页: [1]
查看完整版本: 微博搞笑一则