
! script name: turbopost.d/manfunction

!A
!A NAME:
!A
!A 	MANUAL FUNCTION
!A
!A DESCRIPTION:
!A
!A 	This script allows the user to input a manual function
!A 	CMM output.
!A
!B INSTRUCTIONS:
!B
!B

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

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


DeActivateUndo
First= 1
Pick_loop:!
Quote$= CHR$(34)

Stat=MakeActiveCurr

Stat=CurrActionName(Command$)
Command_type=CurrActionTyp
Strean_input=0

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

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

Stat=OutputCmdBuff("ASSIGN: Man_function= "&Quote$&Answer$&Quote$&";",First)
Stat=OutputCmdBuff("MACRO: manual_function ",0)
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
