View Single Post
Old 23rd April 2021, 17:41   #27  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Thanks Dog, I got the clip.
I wanted the resize pack for the other functions, RatioResize, PadResize and PadMirror.

EDIT:
The DBase thing could be used in realtime, not multiple pass thingy, and you can even delete the Dbase on clip closure using CallCmd().
EDIT: This part would be done before entering scriptclip, ie create and preset DBase,
And supply DB name as arg to scriptclip,
Code:
DB = "My.DB".RT_GetFullPathName

X1_FLD = 0
Y1_FLD = 1
X2_FLD = 2
Y2_FLD = 3

RECORD_0 = 0

TypeString="iiii"   # 4 fields of type int

RT_DBaseAlloc(DB,1,TypeString)   # Single pre-existing record [int field defaults are set to 0]

RT_DBaseSet(DB,RECORD_0,-1,-1,-1,-1)    # PreSet all vars -1
Using the RT_DBaseSet and RT_DBaseGet within Scriptclip.
The RECORD_0 and X1_FLD stuff is just for self documentation, you would likely use constants instead of variables.
During script developement, it is sometimes useful to use vars like X1_FLD etc so things eg field order can be changed around
without changing entire script. When completed, then can simply do a mass text Replace of eg X1_FLD with
the final chosen constant.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 23rd April 2021 at 17:59.
StainlessS is offline   Reply With Quote