請問 成立 簡短的寫法(還有1個未解決)
本帖最后由 tcpuuu 于 2012-8-20 18:50 编辑IF GUICtrlRead($A2)-GUICtrlRead($A2) > 0 THEN
GUICtrlSetColor($A2,0xFF0000);紅色
GUICtrlSetColor($A2,0xFF0000);紅色
ENDIF
IF GUICtrlRead($A2)-GUICtrlRead($A2) < 0 THEN
GUICtrlSetColor($A2,0x008000);
GUICtrlSetColor($A2,0x008000);
ENDIF
IF GUICtrlRead($A2)-GUICtrlRead($A2) > 0 THEN
GUICtrlSetColor($A2,0xFF0000);紅色
GUICtrlSetColor($A2,0xFF0000);紅色
ENDIF
IF GUICtrlRead($A2)-GUICtrlRead($A2) < 0 THEN
GUICtrlSetColor($A2,0x008000);
GUICtrlSetColor($A2,0x008000);
ENDIF
IF GUICtrlRead($A2)-GUICtrlRead($A2) > 0 THEN
GUICtrlSetColor($A2,0xFF0000);紅色
GUICtrlSetColor($A2,0xFF0000);紅色
ENDIF
IF GUICtrlRead($A2)-GUICtrlRead($A2) < 0 THEN
GUICtrlSetColor($A2,0x008000);
GUICtrlSetColor($A2,0x008000);
ENDIF
========================
1-2>01 AND 2都變 紅色
1-2<01 AND 2都變 綠色
1-2 = 0就不管它
==================================================================
$Volume+=1
IF $Volume = 1 then $ume = 14.9
IF $Volume = 2 then $ume = 9.48
IF $Volume = 3 then $ume = 7.12
IF $Volume = 4 then $ume = 5.83
IF $Volume = 5 then $ume = 4.99
IF $Volume = 6 then $ume = 4.42
IF $Volume = 7 then $ume = 3.99
IF $Volume = 8 then $ume = 3.66
IF $Volume = 9 then $ume = 3.39
IF $Volume = 10 then $ume = 3.18
IF $Volume = 11 then $ume = 2.99
IF $Volume = 12 then $ume = 2.83
IF $Volume = 13 then $ume = 2.7
IF $Volume = 14 then $ume = 2.58
IF $Volume = 15 then $ume = 2.48
IF $Volume = 16 then $ume = 2.39
IF $Volume = 17 then $ume = 2.3
IF $Volume = 18 then $ume = 2.23
IF $Volume = 19 then $ume = 2.15
IF $Volume = 20 then $ume = 2.09
IF $Volume = 21 then $ume = 2.03
IF $Volume = 22 then $ume = 1.97
IF $Volume = 23 then $ume = 1.92
IF $Volume = 24 then $ume = 1.87
IF $Volume = 25 then $ume = 1.83
IF $Volume = 26 then $ume = 1.79
IF $Volume = 27 then $ume = 1.74
IF $Volume = 28 then $ume = 1.71
IF $Volume = 29 then $ume = 1.67
IF $Volume = 30 then $ume = 1.63
IF $Volume = 31 then $ume = 1.6
IF $Volume = 32 then $ume = 1.57
IF $Volume = 33 then $ume = 1.54
IF $Volume = 34 then $ume = 1.51
IF $Volume = 35 then $ume = 1.48
IF $Volume = 36 then $ume = 1.46
IF $Volume = 37 then $ume = 1.43
IF $Volume = 38 then $ume = 1.41
IF $Volume = 39 then $ume = 1.38
IF $Volume = 40 then $ume = 1.36
IF $Volume = 41 then $ume = 1.34
IF $Volume = 42 then $ume = 1.32
IF $Volume = 43 then $ume = 1.3
IF $Volume = 44 then $ume = 1.28
IF $Volume = 45 then $ume = 1.25
IF $Volume = 46 then $ume = 1.23
IF $Volume = 47 then $ume = 1.21
IF $Volume = 48 then $ume = 1.19
IF $Volume = 49 then $ume = 1.17
IF $Volume = 50 then $ume = 1.14
IF $Volume = 51 then $ume = 1.12
IF $Volume = 52 then $ume = 1.09
IF $Volume = 53 then $ume = 1.06
IF $Volume = 54 then $ume = 1
IF $Volume = 55 then $ume = 1
IF $Volume = 56 then $ume = 1
GUICtrlSetData($WEL,Round($ARS1*$ume/10000,2))
$ume 後面 小數點 的 數值都 沒有規律性有簡短1點的 寫法嗎?
Local $index =
Local $color =
Local $n
Local $m
For $i = 0 To 2
$n = Number(GUICtrlRead($A2[$index)) - Number(GUICtrlRead($A2[$index))
$m = Floor(($n+abs($n))/(2*abs($n)))
If $n Then
GUICtrlSetColor($A2[$index], $color[$m]);
GUICtrlSetColor($A2[$index], $color[$m]);
EndIf
Next
页:
[1]