Not sure if this is the right way to help as I did not learn oscript thru screencaps

.I learned this following the addressbook module,wrote a lot of code and then took OT training.I am doing you a lot of disservice by providing this.But the thing that you want can easily be understood by looking at an existing implementation.
The way would be like this for a webnode command.
1-Set .fPerms in your 0 Setup script with a positive number
2-Create 3 new features called exactly FactoryName,FactoryType and fObjectfactory.These do not exist in the webnode cmd object.
3)Override SubClassIsEnabled and add this code
Code:
Boolean ok = $LLIApi.FactoryUtil.IsCreatable( prgCtx, { $TypeDocument } )
return ok
4)override _SubclassInit() and add this code
Code:
if .fObjectFactory
$LLIAPI.ObjectFactorySubsystem.RegisterItem( this, { $TypeDocument } )
end
5)_NodeTypes should contain 144 for testing
6)factoryName can have this code
Code:
Function String FactoryName()
return( "APPU COMMAND1")
end
7)FactoryType() can have this code
Code:
Function String FactoryType()
return( "APPU COMMAND" )
end
I did this on the playing module called addressbook which I have uploaded here in case you want to look at what I have done.
Once again try to understand the object creation and lifecycle of the oscript objects as if you do not understand it you are going to create leaky code.
I will remove the module from public view soon as I did this in basically 10 to 15 minutes without giving it much thought
Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010