
! script name: turbopost.d/mancodes

!A
!A NAME:
!A
!A 	MANUAL CODES
!A
!A DESCRIPTION:
!A
!A 	This script allows the user to input manual codes desired for his
!A 	CNC output.
!A
!B INSTRUCTIONS:
!B
!B 	MANUAL CODE, Proceed: Enter the manual code EXACTLY how it is to
!B 		appear in the CNC output.
!B		P - This exits the manual code input mode.
!B
!# see also - points.d/xyzinput.hlp

stat=ChangeLabelStr("ScriptNameStatus","Function: manual ")

DIM Destination$[256]
DIM Answer$[256]
DIM Command$[256]
DIM A$[256]


DeActivateUndo
First= 1
Pick_loop:!

Stat=MakeActiveCurr

Stat=CurrActionName(Command$)
Command_type=CurrActionTyp

Stat=SetInputFormat("a99"," ")
Stat=GetValue("MANUAL CODE, Proceed ",Answer$)
IF (ExitScript(Destination$)) THEN Leave

IF Answer$="P" OR Answer$="p" OR Answer$="Proceed" THEN New_command

Stat=OutputCmdBuff("OUTPUT: "&Answer$,First)
First= 0

GOTO Pick_loop

New_command:UpdateCmdFile
	Stat=SetPickMask(WsPickAll)
	Stat=SetInputFormat("n4=","")
	LOAD "turbopost.d/turbocmd"

Leave:!
IF (NOT LEN(Destination$)) THEN
	  LOAD "typecontrol"
ELSE
	  LOAD Destination$
END IF
END
