<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div style="text-align: left;">Some of the bibtex entries I download has entries in them that I don't want to keep, e.g., Month. I thought I would write a script that takes the Field Name and a Value and sets that field to that value. I came up with the following but it is throwing an error -- it reads the field name and the value but then gives an error: "<span style="color: rgba(0, 0, 0, 0.85); text-align: center;">AppleScript reported the following error:</span><span style="text-align: center;"> </span><span style="color: rgba(0, 0, 0, 0.85); text-align: center;">(null)". I suspect it is a simple fix, but I don't know scripting well enough. I </span><span style="text-align: center; caret-color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);">would</span><span style="color: rgba(0, 0, 0, 0.85); text-align: center;"> appreciate any suggestions.</span></div><div><br></div><div><p style="margin: 0px 0px 0px 41.6px; text-indent: -41.6px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Verdana; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal;"><span style="font-variant-ligatures: no-common-ligatures"><b>tell</b> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0000ff"><i>application</i></span><span style="font-variant-ligatures: no-common-ligatures"> "BibDesk"</span></p>
<p style="margin: 0px 0px 0px 83.2px; text-indent: -83.2px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Verdana; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(0, 0, 255);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000"><span class="Apple-tab-span" style="white-space:pre">    </span></span><span style="font-variant-ligatures: no-common-ligatures"><b>activate</b></span></p>
<p style="margin: 0px 0px 0px 83.2px; text-indent: -83.2px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Verdana; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; min-height: 15px;"><span style="font-variant-ligatures: no-common-ligatures"><span class="Apple-tab-span" style="white-space:pre"> </span></span></p>
<p style="margin: 0px 0px 0px 83.2px; text-indent: -83.2px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Verdana; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(76, 78, 78);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000"><span class="Apple-tab-span" style="white-space:pre">   </span></span><span style="font-variant-ligatures: no-common-ligatures">-- without document, there is no selection, so nothing to do</span></p>
<p style="margin: 0px 0px 0px 83.2px; text-indent: -83.2px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Verdana; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal;"><span style="font-variant-ligatures: no-common-ligatures"><span class="Apple-tab-span" style="white-space:pre">   </span><b>if</b> (</span><span style="font-variant-ligatures: no-common-ligatures; color: #0000ff"><b>count</b></span><span style="font-variant-ligatures: no-common-ligatures"> <b>of</b> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0000ff"><i>documents</i></span><span style="font-variant-ligatures: no-common-ligatures">) = 0 <b>then</b></span></p>
<p style="margin: 0px 0px 0px 124.8px; text-indent: -124.9px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Verdana; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(0, 22, 176);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000"><span class="Apple-tab-span" style="white-space:pre">         </span></span><span style="font-variant-ligatures: no-common-ligatures"><b>beep</b></span></p>
<p style="margin: 0px 0px 0px 124.8px; text-indent: -124.9px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Verdana; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(0, 22, 176);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000"><span class="Apple-tab-span" style="white-space:pre">         </span></span><span style="font-variant-ligatures: no-common-ligatures"><b>display dialog</b></span><span style="font-variant-ligatures: no-common-ligatures; color: #000000"> "No documents found." </span><span style="font-variant-ligatures: no-common-ligatures">buttons</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000"> {"•"} </span><span style="font-variant-ligatures: no-common-ligatures">default button</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000"> 1 </span><span style="font-variant-ligatures: no-common-ligatures">giving up after</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000"> 3</span></p>
<p style="margin: 0px 0px 0px 83.2px; text-indent: -83.2px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Verdana; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal;"><span style="font-variant-ligatures: no-common-ligatures"><span class="Apple-tab-span" style="white-space:pre">   </span><b>end</b> <b>if</b></span></p>
<p style="margin: 0px 0px 0px 83.2px; text-indent: -83.2px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Verdana; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal;"><span style="font-variant-ligatures: no-common-ligatures"><span class="Apple-tab-span" style="white-space:pre">   </span><b>set</b> </span><span style="font-variant-ligatures: no-common-ligatures; color: #408000">thePublications</span><span style="font-variant-ligatures: no-common-ligatures"> <b>to</b> <b>the</b> </span><span style="font-variant-ligatures: no-common-ligatures; color: #6c05d3">selection</span><span style="font-variant-ligatures: no-common-ligatures"> <b>of</b> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0000ff"><i>document</i></span><span style="font-variant-ligatures: no-common-ligatures"> 1</span></p>
<p style="margin: 0px 0px 0px 83.2px; text-indent: -83.2px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Verdana; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; min-height: 15px;"><span style="font-variant-ligatures: no-common-ligatures"><span class="Apple-tab-span" style="white-space:pre"> </span></span></p>
<p style="margin: 0px 0px 0px 83.2px; text-indent: -83.2px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Verdana; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal;"><span style="font-variant-ligatures: no-common-ligatures"><span class="Apple-tab-span" style="white-space:pre">   </span><b>set</b> </span><span style="font-variant-ligatures: no-common-ligatures; color: #408000">theField</span><span style="font-variant-ligatures: no-common-ligatures"> <b>to</b> </span><span style="font-variant-ligatures: no-common-ligatures; color: #4415b0">text returned</span><span style="font-variant-ligatures: no-common-ligatures"> <b>of</b> (</span><span style="font-variant-ligatures: no-common-ligatures; color: #0016b0"><b>display dialog</b></span><span style="font-variant-ligatures: no-common-ligatures"> "Enter field to set:" </span><span style="font-variant-ligatures: no-common-ligatures; color: #0016b0">default answer</span><span style="font-variant-ligatures: no-common-ligatures"> "")</span></p>
<p style="margin: 0px 0px 0px 83.2px; text-indent: -83.2px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Verdana; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal;"><span style="font-variant-ligatures: no-common-ligatures"><span class="Apple-tab-span" style="white-space:pre">   </span><b>set</b> </span><span style="font-variant-ligatures: no-common-ligatures; color: #408000">theValue</span><span style="font-variant-ligatures: no-common-ligatures"> <b>to</b> </span><span style="font-variant-ligatures: no-common-ligatures; color: #4415b0">text returned</span><span style="font-variant-ligatures: no-common-ligatures"> <b>of</b> (</span><span style="font-variant-ligatures: no-common-ligatures; color: #0016b0"><b>display dialog</b></span><span style="font-variant-ligatures: no-common-ligatures"> "Enter value to set:" </span><span style="font-variant-ligatures: no-common-ligatures; color: #0016b0">default answer</span><span style="font-variant-ligatures: no-common-ligatures"> "")</span></p>
<p style="margin: 0px 0px 0px 83.2px; text-indent: -83.2px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Verdana; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; min-height: 15px;"><span style="font-variant-ligatures: no-common-ligatures"><span class="Apple-tab-span" style="white-space:pre"> </span></span></p>
<p style="margin: 0px 0px 0px 83.2px; text-indent: -83.2px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Verdana; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal;"><span style="font-variant-ligatures: no-common-ligatures"><span class="Apple-tab-span" style="white-space:pre">   </span><b>if</b> (</span><span style="font-variant-ligatures: no-common-ligatures; color: #408000">theField</span><span style="font-variant-ligatures: no-common-ligatures"> <b>is</b> <b>not</b> "") <b>then</b></span></p>
<p style="margin: 0px 0px 0px 124.8px; text-indent: -124.9px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Verdana; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(64, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000"><span class="Apple-tab-span" style="white-space:pre">         </span><b>repeat</b> <b>with</b> </span><span style="font-variant-ligatures: no-common-ligatures">thePub</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000"> <b>in</b> </span><span style="font-variant-ligatures: no-common-ligatures">thePublications</span></p>
<p style="margin: 0px 0px 0px 166.5px; text-indent: -166.5px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Verdana; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(64, 128, 0);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000"><span class="Apple-tab-span" style="white-space:pre">                 </span><b>set</b> </span><span style="font-variant-ligatures: no-common-ligatures">theField</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000"> <b>of</b> </span><span style="font-variant-ligatures: no-common-ligatures">thePub</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000"> <b>to</b> </span><span style="font-variant-ligatures: no-common-ligatures">theValue</span></p>
<p style="margin: 0px 0px 0px 124.8px; text-indent: -124.9px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Verdana; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal;"><span style="font-variant-ligatures: no-common-ligatures"><span class="Apple-tab-span" style="white-space:pre">         </span><b>end</b> <b>repeat</b></span></p>
<p style="margin: 0px 0px 0px 83.2px; text-indent: -83.2px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Verdana; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal;"><span style="font-variant-ligatures: no-common-ligatures"><span class="Apple-tab-span" style="white-space:pre">   </span><b>end</b> <b>if</b></span></p>
<p style="margin: 0px 0px 0px 83.2px; text-indent: -83.2px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Verdana; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; min-height: 15px;"><span style="font-variant-ligatures: no-common-ligatures"><span class="Apple-tab-span" style="white-space:pre"> </span></span></p>
<p style="margin: 0px 0px 0px 83.2px; text-indent: -83.2px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Verdana; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal;"><span style="font-variant-ligatures: no-common-ligatures"><span class="Apple-tab-span" style="white-space:pre">   </span><b>set</b> </span><span style="font-variant-ligatures: no-common-ligatures; color: #6c05d3">selection</span><span style="font-variant-ligatures: no-common-ligatures"> <b>of</b> </span><span style="font-variant-ligatures: no-common-ligatures; color: #0000ff"><i>document</i></span><span style="font-variant-ligatures: no-common-ligatures"> 1 <b>to</b> </span><span style="font-variant-ligatures: no-common-ligatures; color: #408000">thePublications</span></p>
<p style="margin: 0px 0px 0px 83.2px; text-indent: -83.2px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Verdana; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; min-height: 15px;"><span style="font-variant-ligatures: no-common-ligatures"><span class="Apple-tab-span" style="white-space:pre"> </span></span></p>
<p style="margin: 0px 0px 0px 41.6px; text-indent: -41.6px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Verdana; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(76, 78, 78);"><span style="font-variant-ligatures: no-common-ligatures; color: #000000"><b>end</b> <b>tell</b> </span><span style="font-variant-ligatures: no-common-ligatures">-- Bibdesk</span></p><div><span style="font-variant-ligatures: no-common-ligatures"><br></span></div><div>
<br>==Tamer<br></div></div></body></html>