Life-saving, a simple question of torture I had one afternoon> _ <!
Wei-lun, I used a touch-screen macros, the code is as follows:
Objective:To read the current hours, that is less than 12:00 am, 12 am to 18:00 pm considered to be at other times is that evening, respectively 0,1,2 deposited with LW0.However, the effect and is expected to run different ah.
0 ~ 9 am has become a point, that is, LW = 0
10 ~ 12 has become a point in the afternoon, that is, LW = 1
12 to 13 o'clock at night has become, that is, LW = 2
Macro_Command main ()
int hour = 0, LW0 = 0
GetData (hour, RW_Bcdplc, 60002,1)
If hour <= 12 Then
LW0 = 0
Else If hour> 12 And hour <= 18 Then
LW0 = 1
Else
LW0 = 2
End If
SetData (LW0, LW_Binplc, 0,1)
End Macro_Command
two possibilities:
1, hour of Not the type of return, resulting in errors compared with symbols;
2, hour of the return value is not a standard-hour show;
proposed to set up procedures under the value of the interruption, the show under the variable value.And or or, you Did not use
Leave a Reply
You must be logged in to post a comment.