From 4585e2cfa61cfbe022b01e9c68034f2c0085cbac Mon Sep 17 00:00:00 2001 From: madpink Date: Tue, 28 Jan 2020 14:37:58 -0500 Subject: [PATCH] Script exclusion options Option 1 - Exclude via Preferences -additional options to skip certain types of scripts (stack, card, group, button, field, widget, other) Option 2 - Exclude via comment -adding a commented line with the word "exclude" in it will cause that script to be skipped e.g. "-- exclude from script tracker" --- ScriptTracker.livecode | Bin 64539 -> 67163 bytes .../stack_ScriptTracker_.livecodescript | 4 +++- ...criptTracker_button_id_1003.livecodescript | 15 ++++++++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ScriptTracker.livecode b/ScriptTracker.livecode index d6d8cd62257b7cfdef21164a025160ff728d8519..c0a5d1bdbb7231aa88fe51c1ce6e1cb0193c8e9d 100755 GIT binary patch delta 3087 zcmb7Gd2AF_7=N=fOLx27vXpMSY|D0BYs;~OWrb06%Xr9FhiNVj%;Ge@MhXw0NXI@FEqDn0SFvQN&1MeDBR39jJ+J(%E^x{l4G( zuJ?O=`A>fQalyQz>(-@FpVy1Fni~w(&iyU7o8h{*>xNct>ce6tC%R=NkzD8LmGb?4 zo@7Ewc{XNJy;$+A?N^k1&XdmIY|4{Y?#7b4Qe>aLenm_tvNH8o@}ja#!fE;1)owhP z%=V|STWk>(M&C^xa4scExDO{3x{|QcFXcotUBQW{Y=ZH=TLnk(&A?J>5Utw5SqJ zTOTn+y?#GQH30WiKL@);nz_GVvDH;ulS>T5^KqJI94ksD*DG7pJyXXjiGwffi~57G zb>CbAKMcRRW*7xuG~`o{IIj~7VJ}oS-C43y`O z@w2tiv!`Aizv_8zBI;JR&D&&PNGuwT5<53^bX;u+`{3S=7Q>fk)!iN4{tAy)MBpT; zwY^;|6jzj!Ql?Ll#kC0;r^GxdC21tBEa?htd)C>`T0+ZD!Ax3||E)dUB57(4ZW$1V zSTECsu4QB~msiBZ`h2dJnur+%ub0JqT3kaZwNGJe*uZGBqnj6PhTLL;G=GBE#jz}9 zW7TaeM$)F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fe44b46..4781bc9 100644 --- a/ScriptTracker_Scripts/stack_ScriptTracker_.livecodescript +++ b/ScriptTracker_Scripts/stack_ScriptTracker_.livecodescript @@ -101,7 +101,9 @@ function getDefaultPrefsA put kSyncBeforeSave into tPrefsA["SyncBeforeSave"] put kAutoExternalEditor into tPrefsA["AutoExternalEditor"] put revIDEGetPreference("LCB_textEditor") into tPrefsA["Editor"] - + repeat for each item tType in "stack,group,card,widget,button,field,other" + put false into tPrefsA["exclude" & tType ] + end repeat return tPrefsA end getDefaultPrefsA diff --git a/ScriptTracker_Scripts/stack_ScriptTracker_button_id_1003.livecodescript b/ScriptTracker_Scripts/stack_ScriptTracker_button_id_1003.livecodescript index c2e2cff..0ef9468 100644 --- a/ScriptTracker_Scripts/stack_ScriptTracker_button_id_1003.livecodescript +++ b/ScriptTracker_Scripts/stack_ScriptTracker_button_id_1003.livecodescript @@ -334,12 +334,22 @@ private command _saveScriptFile \ pObjectLongName /* long name of control */ local tCollisionPolicy, tDiff, tFileHash, tFileMissing, tFileNewer local tFileScript, tFullFilePath, tHash, tProps, tPropSets - local tScript, tScriptChanged + local tScript, tScriptChanged, tType if pObjectLongID is empty then put xDataA[pStackName]["longID"] into pObjectLongID end if + // exclude scripts based on type + put word 1 of pObjectLongID into tType + if sPrefsA["exclude" & tType] then + exit _saveScriptFile + else if tType is not among the items of \ + "stack,card,group,button,field,widget" and \ + sPrefsA["excludeOther"] then + exit _saveScriptFile + end if + put _buildFile(pStackName, xDataA, pObjectLongID, pObjectLongName) into tScript if tScript is empty then exit _saveScriptFile addToCount @@ -559,6 +569,9 @@ private function _buildFile \ if (the script of pObjectLongID is not empty) then put the script of pObjectLongID into tScript end if + if line 1 of tScript contains "exclude" then + return empty + end if if (the behavior of pObjectLongID is not empty) then put "# Behavior:" && the behavior of pObjectLongID & lf into tBehavior end if