03-27-2006 4:38 PM
Hi all,
I have step-loop with buttons, which normaly get OK-CODE, but it is the same for all buttons. My problem is that I don't know which button is pressed(in PAI), because they all have same ok_code? Any idea how to get this information?
thx
Mario
03-27-2006 4:50 PM
Hi
If the user presses a push button of step-loop, this is the last action he has done, so in PAI process:
PROCESS PAI.
LOOP.
MODULE GET_LINE.
ENDLOOP.
MODULE USER_COMMAND.
MODULE GET_LINE.
GET CURSOR LINE VN_LINE.
ENDMODULE.
MODULE USER_COMMAND.
CASE OK_CODE.
WHEN 'STEP'.
Calculate the absolute value of lines:
VN_lINE = TOP_LINE + VN_LINE - 1.
Another solution is to insert an OK_CODE value like this:
STEP%
The system'll replace % with the index of the line selected:
MODULE USER_COMMAND.
IF OK_CODE(4) = 'STEP'.
MOVE OK_CODE+4 TO VN_LINE.
Calculate the absolute value of lines:
VN_lINE = TOP_LINE + VN_LINE - 1.
Max
03-27-2006 4:40 PM
03-27-2006 4:42 PM
03-27-2006 4:43 PM
03-27-2006 4:50 PM
Hi
If the user presses a push button of step-loop, this is the last action he has done, so in PAI process:
PROCESS PAI.
LOOP.
MODULE GET_LINE.
ENDLOOP.
MODULE USER_COMMAND.
MODULE GET_LINE.
GET CURSOR LINE VN_LINE.
ENDMODULE.
MODULE USER_COMMAND.
CASE OK_CODE.
WHEN 'STEP'.
Calculate the absolute value of lines:
VN_lINE = TOP_LINE + VN_LINE - 1.
Another solution is to insert an OK_CODE value like this:
STEP%
The system'll replace % with the index of the line selected:
MODULE USER_COMMAND.
IF OK_CODE(4) = 'STEP'.
MOVE OK_CODE+4 TO VN_LINE.
Calculate the absolute value of lines:
VN_lINE = TOP_LINE + VN_LINE - 1.
Max