#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <WinAPIEx.au3>
Global Const $WM_HOTKEY = 0x0312
Global $ws, $ws1, $ws2 = 1, $ws3, $ws4, $ws5
Global $no = 0, $no1 = 0, $no2 = 0, $no3 = 0, $no4 = 0
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("计算器", 185, 257, Default, Default)
GUIRegisterMsg($WM_HOTKEY, 'WM_HOTKEY')
GUICtrlCreateGroup("", 8, 0, 169, 249)
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, "0")
_WinAPI_RegisterHotKey($Form1, 0x0160, 0, 0x60);0
_WinAPI_RegisterHotKey($Form1, 0x0161, 0, 0x61);1
_WinAPI_RegisterHotKey($Form1, 0x0162, 0, 0x62);2
_WinAPI_RegisterHotKey($Form1, 0x0163, 0, 0x63);3
_WinAPI_RegisterHotKey($Form1, 0x0164, 0, 0x64);4
_WinAPI_RegisterHotKey($Form1, 0x0165, 0, 0x65);5
_WinAPI_RegisterHotKey($Form1, 0x0166, 0, 0x66);6
_WinAPI_RegisterHotKey($Form1, 0x0167, 0, 0x67);7
_WinAPI_RegisterHotKey($Form1, 0x0168, 0, 0x68);8
_WinAPI_RegisterHotKey($Form1, 0x0169, 0, 0x69);9
_WinAPI_RegisterHotKey($Form1, 0x016E, 0, 0x6E);.
_WinAPI_RegisterHotKey($Form1, 0x016C, 0, 0x6C);=
_WinAPI_RegisterHotKey($Form1, 0x016B, 0, 0x6B);+
_WinAPI_RegisterHotKey($Form1, 0x016D, 0, 0x6D);-
_WinAPI_RegisterHotKey($Form1, 0x016A, 0, 0x6A);*
_WinAPI_RegisterHotKey($Form1, 0x016F, 0, 0x6F);/
_WinAPI_RegisterHotKey($Form1, 0x0120, 0, 0x20);空格
$Button1 = GUICtrlCreateButton("1", 16, 168, 35, 33)
$Button2 = GUICtrlCreateButton("2", 56, 168, 35, 33)
$Button3 = GUICtrlCreateButton("3", 96, 168, 35, 33)
$Button4 = GUICtrlCreateButton("4", 16, 128, 35, 33)
$Button5 = GUICtrlCreateButton("5", 56, 128, 35, 33)
$Button6 = GUICtrlCreateButton("6", 96, 128, 35, 33)
$Button7 = GUICtrlCreateButton("7", 16, 88, 35, 33)
$Button8 = GUICtrlCreateButton("8", 56, 88, 35, 33)
$Button9 = GUICtrlCreateButton("9", 96, 88, 35, 33)
$Button10 = GUICtrlCreateButton("0", 16, 208, 75, 33)
$Button11 = GUICtrlCreateButton(".", 96, 208, 35, 33)
$Button12 = GUICtrlCreateButton("=", 136, 168, 35, 73)
$Button13 = GUICtrlCreateButton("+", 136, 88, 35, 73)
$Button14 = GUICtrlCreateButton("-", 136, 48, 35, 33)
$Button15 = GUICtrlCreateButton("×", 96, 48, 35, 33)
$Button16 = GUICtrlCreateButton("÷", 56, 48, 35, 33)
$Button17 = GUICtrlCreateButton("CE", 16, 48, 35, 33)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$ws1 = 1
$no2 = 0
If $no1 = 0 Then
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws1)
$no1 = $ws1
Else
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
$no1 = Number($no1 & $ws1)
GUICtrlSetData(-1, $no1)
$ws1 = $no1
EndIf
Case $Button2
$ws1 = 2
$no2 = 0
If $no1 = 0 Then
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws1)
$no1 = $ws1
Else
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
$no1 = Number($no1 & $ws1)
GUICtrlSetData(-1, $no1)
$ws1 = $no1
EndIf
Case $Button3
$ws1 = 3
$no2 = 0
If $no1 = 0 Then
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws1)
$no1 = $ws1
Else
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
$no1 = Number($no1 & $ws1)
GUICtrlSetData(-1, $no1)
$ws1 = $no1
EndIf
Case $Button4
$ws1 = 4
$no2 = 0
If $no1 = 0 Then
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws1)
$no1 = $ws1
Else
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
$no1 = Number($no1 & $ws1)
GUICtrlSetData(-1, $no1)
$ws1 = $no1
EndIf
Case $Button5
$ws1 = 5
$no2 = 0
If $no1 = 0 Then
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws1)
$no1 = $ws1
Else
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
$no1 = Number($no1 & $ws1)
GUICtrlSetData(-1, $no1)
$ws1 = $no1
EndIf
Case $Button6
$ws1 = 6
$no2 = 0
If $no1 = 0 Then
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws1)
$no1 = $ws1
Else
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
$no1 = Number($no1 & $ws1)
GUICtrlSetData(-1, $no1)
$ws1 = $no1
EndIf
Case $Button7
$ws1 = 7
$no2 = 0
If $no1 = 0 Then
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws1)
$no1 = $ws1
Else
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
$no1 = Number($no1 & $ws1)
GUICtrlSetData(-1, $no1)
$ws1 = $no1
EndIf
Case $Button8
$ws1 = 8
$no2 = 0
If $no1 = 0 Then
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws1)
$no1 = $ws1
Else
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
$no1 = Number($no1 & $ws1)
GUICtrlSetData(-1, $no1)
$ws1 = $no1
EndIf
Case $Button9
$ws1 = 9
$no2 = 0
If $no1 = 0 Then
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws1)
$no1 = $ws1
Else
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
$no1 = Number($no1 & $ws1)
GUICtrlSetData(-1, $no1)
$ws1 = $no1
EndIf
Case $Button10
$ws1 = 0
$no2 = 0
If $no1 = 0 Then
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws1)
$no1 = $ws1
Else
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
$no1 = $no1 & $ws1
GUICtrlSetData(-1, $no1)
$ws1 = $no1
EndIf
Case $Button11
$ws1 = "."
$no2 = 0
If $no1 = 0 Then
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws1)
$no1 = $ws1
Else
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
$no1 = $no1 & $ws1
GUICtrlSetData(-1, $no1)
$ws1 = Number($no1)
EndIf
Case $Button12
$no1 = 0
While $no = 13
$ws = $ws2 + $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws)
$no = 0
$no1 = 0
$no2 = 0
$no3 = 1
$no4 = 1
$ws3 = $ws1
$ws4 = $ws
$ws1 = $ws
$ws2 = 0
WEnd
While $no = 14
$ws = $ws2 - $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws)
$no = 0
$no1 = 0
$no2 = 0
$no3 = 2
$no4 = 1
$ws4 = $ws
$ws3 = $ws1
$ws1 = $ws
$ws2 = 0
WEnd
While $no = 15
$ws = $ws2 * $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws)
$no = 0
$no1 = 0
$no2 = 0
$no3 = 3
$no4 = 1
$ws4 = $ws
$ws3 = $ws1
$ws1 = $ws
$ws2 = 1
WEnd
While $no = 16
$ws = $ws2 / $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws)
$no = 0
$no1 = 0
$no2 = 0
$no3 = 4
$no4 = 1
$ws4 = $ws
$ws3 = $ws1
$ws1 = $ws
$ws2 = 1
WEnd
Switch $no3
Case 1
$ws2 = $ws1
$ws1 = $ws3
$no = 13
Case 2
$ws2 = $ws1
$ws1 = $ws3
$no = 14
Case 3
$ws2 = $ws1
$ws1 = $ws3
$no = 15
Case 4
$ws2 = $ws1
$ws1 = $ws3
$no = 16
EndSwitch
Case $Button13
$no1 = 0
If $no = 0 Then
$ws2 = $ws1
$no = 13
ElseIf $no2 = 1 Then
$ws2 = $ws1
$no = 13
$no2 = 1
Else
Switch $no
Case 13
If $no4 = 1 Then
$ws2 = $ws4
$no = 13
$no2 = 1
Else
$ws2 = $ws2 + $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 13
$no2 = 1
EndIf
Case 14
If $no4 = 1 Then
$ws2 = $ws4
$no = 13
$no2 = 1
Else
$ws2 = $ws2 - $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 13
$no2 = 1
EndIf
Case 15
If $no4 = 1 Then
$ws2 = $ws4
$no = 13
$no2 = 1
Else
$ws2 = $ws2 * $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 13
$no2 = 1
EndIf
Case 16
If $no4 = 1 Then
$ws2 = $ws4
$no = 13
$no2 = 1
Else
$ws2 = $ws2 / $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 13
$no2 = 1
EndIf
EndSwitch
EndIf
Case $Button14
$no1 = 0
If $no = 0 Then
$ws2 = $ws1
$no = 14
$no2 = 1
ElseIf $no2 = 1 Then
$ws2 = $ws1
$no = 14
$no2 = 1
Else
Switch $no
Case 13
If $no4 = 1 Then
$ws2 = $ws4
$no = 14
$no2 = 1
Else
$ws2 = $ws2 + $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 14
$no2 = 1
EndIf
Case 14
If $no4 = 1 Then
$ws2 = $ws4
$no = 14
$no2 = 1
Else
$ws2 = $ws2 - $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 14
$no2 = 1
EndIf
Case 15
If $no4 = 1 Then
$ws2 = $ws4
$no = 14
$no2 = 1
Else
$ws2 = $ws2 * $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 14
$no2 = 1
EndIf
Case 16
If $no4 = 1 Then
$ws2 = $ws4
$no = 14
$no2 = 1
Else
$ws2 = $ws2 / $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 14
$no2 = 1
EndIf
EndSwitch
EndIf
Case $Button15
$no1 = 0
If $no = 0 Then
$ws2 = $ws1
$no = 15
$no2 = 1
ElseIf $no2 = 1 Then
$ws2 = $ws1
$no = 15
$no2 = 1
Else
Switch $no
Case 13
If $no4 = 1 Then
$ws2 = $ws4
$no = 15
$no2 = 1
Else
$ws2 = $ws2 + $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 15
$no2 = 1
EndIf
Case 14
If $no4 = 1 Then
$ws2 = $ws4
$no = 15
$no2 = 1
Else
$ws2 = $ws2 - $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 15
$no2 = 1
EndIf
Case 15
If $no4 = 1 Then
$ws2 = $ws4
$no = 15
$no2 = 1
Else
$ws2 = $ws2 * $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 15
$no2 = 1
EndIf
Case 16
If $no4 = 1 Then
$ws2 = $ws4
$no = 15
$no2 = 1
Else
$ws2 = $ws2 / $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 15
$no2 = 1
EndIf
EndSwitch
EndIf
Case $Button16
$no1 = 0
If $no = 0 Then
$ws2 = $ws1
$no = 16
$no2 = 1
ElseIf $no2 = 1 Then
$ws2 = $ws1
$no = 16
$no2 = 1
Else
Switch $no
Case 13
If $no4 = 1 Then
$ws2 = $ws4
$no = 16
$no2 = 1
Else
$ws2 = $ws2 + $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 16
$no2 = 1
EndIf
Case 14
If $no4 = 1 Then
$ws2 = $ws4
$no = 16
$no2 = 1
Else
$ws2 = $ws2 - $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 16
$no2 = 1
EndIf
Case 15
If $no4 = 1 Then
$ws2 = $ws4
$no = 16
$no2 = 1
Else
$ws2 = $ws2 * $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 16
$no2 = 1
EndIf
Case 16
If $no4 = 1 Then
$ws2 = $ws4
$no = 16
$no2 = 1
Else
$ws2 = $ws2 / $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 16
$no2 = 1
EndIf
EndSwitch
EndIf
Case $Button17
$no = 0
$no1 = 0
$no2 = 0
$no3 = 0
$no4 = 0
$ws = 0
$ws1 = ""
$ws2 = 1
$ws3 = 0
$ws4 = 0
$ws5 = 0
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, 0)
EndSwitch
WEnd
Func WM_HOTKEY($Form1, $iMsg, $wParam, $lParam)
Switch _WinAPI_HiWord($lParam)
Case 0x60
$ws1 = $ws1 & '0'
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws1)
Case 0x61
$ws1 = Number($ws1 & '1')
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws1)
Case 0x62
$ws1 = Number($ws1 & '2')
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws1)
Case 0x63
$ws1 = Number($ws1 & '3')
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws1)
Case 0x64
$ws1 = Number($ws1 & '4')
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws1)
Case 0x65
$ws1 = Number($ws1 & '5')
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws1)
Case 0x66
$ws1 = Number($ws1 & '6')
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws1)
Case 0x67
$ws1 = Number($ws1 & '7')
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws1)
Case 0x68
$ws1 = Number($ws1 & '8')
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws1)
Case 0x69
$ws1 = Number($ws1 & '9')
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws1)
Case 0x6E
$ws1 = $ws1 & '.'
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws1)
Case 0x6B
$no1 = 0
If $no = 0 Then
$ws2 = $ws1
$no = 13
ElseIf $no2 = 1 Then
$ws2 = $ws1
$no = 13
$no2 = 1
Else
Switch $no
Case 13
If $no4 = 1 Then
$ws2 = $ws4
$no = 13
$no2 = 1
Else
$ws2 = $ws2 + $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 13
$no2 = 1
EndIf
Case 14
If $no4 = 1 Then
$ws2 = $ws4
$no = 13
$no2 = 1
Else
$ws2 = $ws2 - $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 13
$no2 = 1
EndIf
Case 15
If $no4 = 1 Then
$ws2 = $ws4
$no = 13
$no2 = 1
Else
$ws2 = $ws2 * $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 13
$no2 = 1
EndIf
Case 16
If $no4 = 1 Then
$ws2 = $ws4
$no = 13
$no2 = 1
Else
$ws2 = $ws2 / $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 13
$no2 = 1
EndIf
EndSwitch
EndIf
Case 0x6D
$no1 = 0
If $no = 0 Then
$ws2 = $ws1
$no = 14
$no2 = 1
ElseIf $no2 = 1 Then
$ws2 = $ws1
$no = 14
$no2 = 1
Else
Switch $no
Case 13
If $no4 = 1 Then
$ws2 = $ws4
$no = 14
$no2 = 1
Else
$ws2 = $ws2 + $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 14
$no2 = 1
EndIf
Case 14
If $no4 = 1 Then
$ws2 = $ws4
$no = 14
$no2 = 1
Else
$ws2 = $ws2 - $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 14
$no2 = 1
EndIf
Case 15
If $no4 = 1 Then
$ws2 = $ws4
$no = 14
$no2 = 1
Else
$ws2 = $ws2 * $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 14
$no2 = 1
EndIf
Case 16
If $no4 = 1 Then
$ws2 = $ws4
$no = 14
$no2 = 1
Else
$ws2 = $ws2 / $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 14
$no2 = 1
EndIf
EndSwitch
EndIf
Case 0x6A
$no1 = 0
If $no = 0 Then
$ws2 = $ws1
$no = 15
$no2 = 1
ElseIf $no2 = 1 Then
$ws2 = $ws1
$no = 15
$no2 = 1
Else
Switch $no
Case 13
If $no4 = 1 Then
$ws2 = $ws4
$no = 15
$no2 = 1
Else
$ws2 = $ws2 + $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 15
$no2 = 1
EndIf
Case 14
If $no4 = 1 Then
$ws2 = $ws4
$no = 15
$no2 = 1
Else
$ws2 = $ws2 - $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 15
$no2 = 1
EndIf
Case 15
If $no4 = 1 Then
$ws2 = $ws4
$no = 15
$no2 = 1
Else
$ws2 = $ws2 * $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 15
$no2 = 1
EndIf
Case 16
If $no4 = 1 Then
$ws2 = $ws4
$no = 15
$no2 = 1
Else
$ws2 = $ws2 / $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 15
$no2 = 1
EndIf
EndSwitch
EndIf
Case 0x6F
$no1 = 0
If $no = 0 Then
$ws2 = $ws1
$no = 16
$no2 = 1
ElseIf $no2 = 1 Then
$ws2 = $ws1
$no = 16
$no2 = 1
Else
Switch $no
Case 13
If $no4 = 1 Then
$ws2 = $ws4
$no = 16
$no2 = 1
Else
$ws2 = $ws2 + $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 16
$no2 = 1
EndIf
Case 14
If $no4 = 1 Then
$ws2 = $ws4
$no = 16
$no2 = 1
Else
$ws2 = $ws2 - $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 16
$no2 = 1
EndIf
Case 15
If $no4 = 1 Then
$ws2 = $ws4
$no = 16
$no2 = 1
Else
$ws2 = $ws2 * $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 16
$no2 = 1
EndIf
Case 16
If $no4 = 1 Then
$ws2 = $ws4
$no = 16
$no2 = 1
Else
$ws2 = $ws2 / $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws2)
$no = 16
$no2 = 1
EndIf
EndSwitch
EndIf
Case 0x6C
$no1 = 0
While $no = 13
$ws = $ws2 + $ws1
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, $ws)
$no = 0
$no1 = 0
$no2 = 0
$no3 = 1
$no4 = 1
$ws3 = $ws1
$ws4 = $ws
$ws1 = $ws
$ws2 = 0
WEnd
Case 0x20
$no = 0
$no1 = 0
$no2 = 0
$no3 = 0
$no4 = 0
$ws = 0
$ws1 = ""
$ws2 = 1
$ws3 = 0
$ws4 = 0
$ws5 = 0
GUICtrlCreateEdit("", 16, 16, 153, 21, BitOR($ES_RIGHT, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN))
GUICtrlSetData(-1, 0)
EndSwitch
EndFunc ;==>WM_HOTKEY
能不能帮我精减下,看的我头都大了