dddwd
发表于 2010-4-22 13:03:03
呵呵呵呵呵呵呵呵呵呵呵额呵呵
dddwd
发表于 2010-4-22 13:03:07
呵呵呵呵呵呵呵呵呵呵呵额呵呵
dddwd
发表于 2010-4-22 13:03:12
呵呵呵呵呵呵呵呵呵呵呵额呵呵
dddwd
发表于 2010-4-22 13:03:16
呵呵呵呵呵呵呵呵呵呵呵额呵呵
dddwd
发表于 2010-4-22 13:03:20
呵呵呵呵呵呵呵呵呵呵呵额呵呵
doshowyam
发表于 2010-4-22 13:36:21
来看看....学习
水木子
发表于 2010-4-22 13:53:13
回复 50# dddwd
敢在太岁头上动土,你惨啦!你!
C.L
发表于 2010-4-22 15:16:34
回复 50# dddwd
恶意灌水,来找罚的
landays
发表于 2010-4-22 18:09:06
我也看看..
3mile
发表于 2010-4-22 20:04:54
我是来围观dddwd同学的。
131738
发表于 2010-4-22 21:37:27
看看是什么。。。。。。。。。。。
caicaicaicaijj
发表于 2010-4-22 23:30:08
回复 1# afan
看看
doshowyam
发表于 2010-4-22 23:46:33
看看这个心跳#include <GUIConstantsEx.au3>
Dim $P = RegRead('HKLM\SOFTWARE\AutoIt v3\AutoIt', 'InstallDir')
Dim $Ico = $P & '\Aut2Exe\Icons\strawberry.ico'
$formh = GUICreate('test', 350, 130)
$cIco = GUICtrlCreateIcon($Ico, -1, 200, 50, 32, 32)
GUICtrlCreateLabel("心跳速率(次/分钟)", 8, 70, 60, 30)
GUICtrlCreateLabel("心跳变率(次/分钟)", 8, 100, 60, 30)
GUICtrlCreateLabel("心跳最高值(次/分钟)", 8, 40, 60, 30)
GUICtrlCreateLabel("心跳最低值(次/分钟)", 8, 10, 60, 30)
$edit0 = GUICtrlCreateEdit("", 75, 10, 40, 18, 0x2000)
$edit1 = GUICtrlCreateEdit("", 75, 40, 40, 18, 0x2000)
$edit2 = GUICtrlCreateEdit("", 75, 70, 40, 18, 0x2000)
$edit3 = GUICtrlCreateEdit("", 75, 100, 40, 18, 0x2000)
$bu_chang = GUICtrlCreateButton("输入初始参数", 140, 40, 50, 50, 0x3300)
GUICtrlSetState($edit0, $GUI_DISABLE)
GUICtrlSetState($edit1, $GUI_DISABLE)
GUICtrlSetState($edit2, $GUI_DISABLE)
GUICtrlSetState($edit3, $GUI_DISABLE)
GUISetState()
Global $hartdata =
Global $icorect =
$input = 0
AdlibRegister('pengpeng', 50)
$jstime = TimerInit()
$lastetime = TimerDiff($jstime)
$runt = 0
While 1
$runt += 1
If $runt > 500 Then
If $hartdata > 0 Then
$hartdata -= Random(0,5,1)
Else
$hartdata += Random(0,5,1)
EndIf
$runt = 0
EndIf
If $hartdata = 3 Then
If Not IsDeclared("scl") Then $scl = 0
If $scl <> 11 Then
$scl = MsgBox(86, " ~@^@~", " 心跳超出承受范围!!" & @CRLF & "你玩完啦!!")
Switch $scl
Case 2
;$hartdata = 60
;$hartdata = 100
$hartdata = $hartdata
$hartdata = 0
$hartdata = 1
Case 10
$hartdata = 60
$hartdata = 100
$hartdata = 80
$hartdata = 0
$hartdata = 1
Case 11
;$hartdata =
;$hartdata =
;$hartdata =
;$hartdata =
;$hartdata =
Case Else
$scl = 11
EndSwitch
EndIf
EndIf
$nMsg = GUIGetMsg(1)
If $input = 0 Then
GUICtrlSetData($edit0, $hartdata)
GUICtrlSetData($edit1, $hartdata)
GUICtrlSetData($edit2, $hartdata)
GUICtrlSetData($edit3, $hartdata)
EndIf
Switch $nMsg
Case -3
Exit
Case $cIco
Case $GUI_EVENT_PRIMARYDOWN
If Not IsDeclared("clickt") Then
$clickt = TimerInit()
$mdbclick = False
Else
$ctds = TimerDiff($clickt)
If $ctds < 1000 Then
$mdbclick = True
Else
$mdbclick = False
EndIf
$clickt = TimerInit()
EndIf
$msinfo = GUIGetCursorInfo($formh)
If $msinfo = $cIco Then
If $mdbclick Then
$hartdata = 0
Else
$hartdata += 1
EndIf
EndIf
Case $GUI_EVENT_SECONDARYDOWN
$msinfo = GUIGetCursorInfo($formh)
If $msinfo = $cIco Then
$hartdata -= 1
EndIf
Case $bu_chang
If $input Then
GUICtrlSetData($bu_chang, "输入初始参数")
$input = 0
GUICtrlSetState($edit0, $GUI_DISABLE)
GUICtrlSetState($edit1, $GUI_DISABLE)
GUICtrlSetState($edit2, $GUI_DISABLE)
GUICtrlSetState($edit3, $GUI_DISABLE)
$hartdata = GUICtrlRead($edit0)
$hartdata = GUICtrlRead($edit1)
$hartdata = GUICtrlRead($edit2)
$hartdata = GUICtrlRead($edit3)
$hartdata = 1
$scl = 0
Else
GUICtrlSetData($bu_chang, "确定")
$input = 1
GUICtrlSetState($edit0, $GUI_ENABLE)
GUICtrlSetState($edit1, $GUI_ENABLE)
GUICtrlSetState($edit2, $GUI_ENABLE)
GUICtrlSetState($edit3, $GUI_ENABLE)
EndIf
EndSwitch
WEnd
Func pengpeng()
Local $hartpos =
If $hartdata = 3 Then Return SetError(1, 0, 0)
$hartodpos = ControlGetPos($formh, "", $cIco)
$distance = TimerDiff($jstime) - $lastetime
$addtimes = $hartdata * $distance / 6000
$hartdata += $addtimes
If $hartdata > $hartdata Then
$hartdata = 3
EndIf
If $hartdata < $hartdata Then
$hartdata = 3
EndIf
$hicomax = $icorect
$hicomin = $icorect
$hicocrmax = 0.5 * ($icorect - $icorect) * ($hartdata - $hartdata) / ($hartdata - $hartdata) + $icorect + (0.5 * ($icorect - $icorect))
$hicocrn = $hartodpos
$icoadd = ($hicocrmax - $hicomin) * 2 * $distance / (1000 * 60 / $hartdata)* Random(0.8,1.2)
Switch $hartdata
Case 1
$hicocrn += $icoadd
If $hicocrn >= $hicocrmax Then
$hartdata = 0
$hicocrn = $hicocrmax
EndIf
Case 0
$hicocrn -= $icoadd
If $hicocrn <= $hicomin Then
$hartdata = 1
$hicocrn = $hicomin
EndIf
Case 3
Case Else
MsgBox(0, "", "不知道你心在干什么!!")
Exit
EndSwitch
$hartpos = $hartpos - Round($hicocrn / 2)
$hartpos = $hartpos - Round($hicocrn / 2)
GUICtrlSetPos($cIco, $hartpos, $hartpos, $hicocrn, $hicocrn)
$lastetime = TimerDiff($jstime)
EndFunc ;==>pengpeng
lxz
发表于 2010-4-23 06:37:00
LS的代码精彩.....
卫和谐
发表于 2010-4-23 07:32:43
回复 59# doshowyam
很形象啊,非常不错!