找回密码
 加入
搜索
查看: 3142|回复: 11

微博搞笑一则

 火.. [复制链接]
发表于 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[5][10]
$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文件在附件里

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2010-11-16 23:44:00 | 显示全部楼层
呵呵有意思,顶楼主的学习精神
发表于 2010-11-17 00:00:41 | 显示全部楼层
楼主这个有创意
发表于 2010-11-17 09:35:04 | 显示全部楼层
呵呵 太有趣了
发表于 2010-11-17 13:07:29 | 显示全部楼层
没有我的有意思啊

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2010-11-17 18:40:17 | 显示全部楼层
哈哈。都很搞笑啊。我顶
发表于 2010-11-18 15:54:51 | 显示全部楼层
我去,
小沈阳在飞机上猴急地舔兽兽
发表于 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[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
发表于 2010-11-21 00:50:58 | 显示全部楼层
谢谢蜘蛛抱蛋 分享
发表于 2010-11-21 08:22:32 | 显示全部楼层
好,我也拿来修改一下
发表于 2010-11-22 23:22:06 | 显示全部楼层

全部都不认识的!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2010-11-23 09:17:54 | 显示全部楼层
支持搂主的学习精神!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-4 11:06 , Processed in 0.082806 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表