[Framers] ExtendScript does not set Property ival
Klaus Daube
klaus at daube.ch
Mon Dec 7 05:55:55 PST 2020
Dear all
My post on the FM Adobe forum
(https://community.adobe.com/t5/framemaker/find-customisation-flags-not-accepted/td-p
/11649459/) did not trigger any reaction so far:
o Either the solution is so trivial that nobody wants to blame me
o Or the problem is so nasty that nobody knows a solution to it.
Test_GetFindParameters.jsx ====== UTF-8 ===========================
Test for the functions GetFindParameters, FindSomething
History 2020-12-07
*/ ; // ==============================================================
//#target framemaker
//@target framemaker
GetFindParameters ("\\d[st|nd|rd|th]");
function GetFindParameters (sSearch) { //======================
// Set up a text find with case sensitive RegEx
var findParms, qFlags, oPropVal1, oPropVal2, oPropVal3;
findParms = new PropVals();
oPropVal1 = new PropVal() ;
oPropVal1.propIdent.num = Constants.FS_FindText;
oPropVal1.propVal.valType = Constants.FT_String;
oPropVal1.propVal.sval = sSearch;
findParms.push(oPropVal1);
oPropVal2 = new PropVal() ;
oPropVal2.propIdent.num = Constants.FS_FindCustomizationFlags ;
oPropVal2.propVal.valType = Constants.FT_Integer;
qFlags = 0;
qFlags = qFlags | Constants.FF_FIND_CONSIDER_CASE; // 0x01
qFlags = qFlags | Constants.FF_FIND_USE_REGEX; // 0x10
oPropVal2.propVal.ival = qFlags; //
findParms.push(oPropVal2);
oPropVal3 = new PropVal ();
oPropVal3.propIdent.num = Constants.FS_RegexFlavour;
oPropVal3.propVal.valType = Constants.FT_Integer;
oPropVal3.propVal.ival = Constants.FR_USE_PERL; // 1
findParms.push(oPropVal3);
$.bp(true); // check oPropVal2 and oPropVal3
return findParms;
} //--- end GetFindParameters ---------------------------------------
I do not get correct PropVals (an image doesn't make it into the forum, hence a
retype of the Data Browser here):
findParms = [object PropVal],[object PropVal],[object PropVal]
oPropVal1 = [object PropVal]
propldent = [object Propldent]
name =
num = 1
propVal = [object TypedVal]
ival = ssval does not have a value
sval = \d[st|nd|rd|th]
val = obj does not have a value
valType = 3
oPropVal2 = [object PropVal]
propldent = [object Propldent]
name =
num =15
propVal = [object TypedVal]
ival = ssval does not have a value
sval =
val = obj does not have a value
valType = 1
oPropVal3 = [object PropVal]
propldent = [object Propldent]
name =
num = 17
propVal = [object TypedVal]
ival = ssval does not have a value
sval =
val = obj does not have a value
valType = 1
qFlags = 17
sSearch = \d[st|nd|rd|th]
Any ideas from this audience?
Klaus
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Klaus Daube Phone: +41-44-381 37 77
Schäracher 11 Mail: klaus at daube.ch
CH-8053 Zürich Web: www.daube.ch
More information about the Framers
mailing list