
! script name: items.d/listitems
! topic: list individual item flags

!A
!A NAME:
!A
!A 	List Item Flags
!A
!A DESCRIPTION:
!A
!A 	This script lists individual item flags present in a file.  This will
!A 	let you verify which item flags, if any, are present.
!A
!# see also - htdocs/help.d/items.htm
!# see also - htdocs/help.d/property.htm

stat=ChangeLabelStr("ScriptNameStatus","Function: list items ")

DIM Destination$[256]
DIM Answer$[256]
DIM Name$[256]
DIM A$[256]
DIM B$[256]
DIM File$[256]
DIM File2$[256]

Start:!

Group= GrpOfUserItems
IF NOT GroupCount(Group) THEN Leave
Stat=UserSelectBox("ITEMS","Item selected",0,WsPropGroupSelect,Group)

Pick_prop:!
Stat=SetInputFormat("a99","")
Stat=GetValue("INPUT ID NAME",Name$)
IF (ExitScript(Destination$)) THEN Leave
IF Name$= "CANCEL" THEN Leave

Num1= NumericPrefix(Name$)
IF NOT Num1 THEN Pick_prop
Element= GroupElement(Group,Num1)
IF NOT ValidGeometry(Element) THEN Start
File$="tempdata"
Stat=OutputUserData(Element,File$,WsNewFile)
Stat=MessageFileBox(File$,Name$)
GOTO Pick_prop

Leave:!
Stat=SetInputFormat("n4","")
Stat= DeleteEntity(Group)
LowerSelectBox
IF (NOT LEN(Destination$)) THEN
	 LOAD "typecontrol"
ELSE
	 LOAD Destination$
END IF
END
