<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I couldn't get sync_to_preview to work, but following Dick's example in Changes to 4.24, it does work to use instead something like<div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Verdana;" class=""><b class="">tell</b> <span style="color: #0000ff" class=""><i class="">application</i></span> "TeXShop"</div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Verdana;" class=""><span class="Apple-tab-span" style="white-space:pre"> </span><b class="">set</b> <span style="color: #408000" class="">frontdoc</span> <b class="">to</b> (<span style="color: #0000ff" class=""><i class="">document</i></span> <b class="">of</b> <span style="color: #0000ff" class=""><i class="">window</i></span> 1)</div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Verdana; color: rgb(64, 128, 0);" class=""><span style="color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre"> </span><b class="">tell</b> </span>frontdoc</div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Verdana;" class=""><span class="Apple-tab-span" style="white-space:pre"> </span><b class="">try</b></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Verdana; color: rgb(76, 78, 78);" class=""><span style="color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre"> </span></span>--sync_to_preview theIndex 1 theLine 12 theName texfile</div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Verdana; color: rgb(0, 0, 255);" class=""><span style="color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre"> </span></span><b class="">sync_preview_line</b><span style="color: #000000" class=""> </span>theLine<span style="color: #000000" class=""> 12</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Verdana; color: rgb(0, 0, 255);" class=""><span style="color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre"> </span></span><b class="">sync_preview_index</b><span style="color: #000000" class=""> </span>theIndex<span style="color: #000000" class=""> 1</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Verdana; color: rgb(0, 0, 255);" class=""><span style="color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre"> </span></span><b class="">sync_preview_name</b><span style="color: #000000" class=""> </span>theName<span style="color: #000000" class=""> </span><span style="color: #408000" class="">texfile</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Verdana;" class=""><span class="Apple-tab-span" style="white-space:pre"> </span><b class="">on</b> <b class="">error</b></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Verdana; color: rgb(0, 22, 176);" class=""><span style="color: #000000" class=""><span class="Apple-tab-span" style="white-space:pre"> </span></span><b class="">display dialog</b><span style="color: #000000" class=""> "help"</span></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Verdana;" class=""><span class="Apple-tab-span" style="white-space:pre"> </span><b class="">end</b> <b class="">try</b></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Verdana;" class=""><span class="Apple-tab-span" style="white-space:pre"> </span><b class="">end</b> <b class="">tell</b></div><div style="margin: 0px; font-stretch: normal; font-size: 16px; line-height: normal; font-family: Verdana;" class=""><b class="">end</b> <b class="">tell</b></div><div class=""><b class=""><br class=""></b></div><div><br class=""><blockquote type="cite" class=""><div class="">On Jun 25, 2021, at 10:51 AM, tkiffe <<a href="mailto:tom@kiffe.com" class="">tom@kiffe.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Howdy y’all,<br class=""><br class="">I am using the following minimal Apple Script to sync from a source file to a PDF file in TeXShop:<br class=""><br class="">set texfile to "/Users/tkiffe/Documents/textests/gentle.tex"<br class="">set pdffile to "/Users/tkiffe/Documents/textests/gentle.pdf"<br class="">set syncfile to "/Users/tkiffe/Documents/textests/gentle.synctex.gz"<br class="">tell application "/Applications/TeX/TeXShop.app"<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>try<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span>sync_to_preview pdffile theIndex 1 theLine 1992 theName texfile<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>on error<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span>display dialog "help"<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>end try<br class="">end tell<br class=""><br class="">The values of the parameters theIndex, theLine, and theName were obtained through BBEdit and are valid.<br class="">When I run the script with gentle.pdf displayed in TeXShop, I get no error messages and nothing happens to the pdf file. I don’t know what the object of the sync_to_preview command should be. I have tried the pdf file, the tex file, and even the synctex.gz file. None of them work. TeXShop’s Applescript dictionary simply states<br class=""><br class="">sync_to_preview: object of the command<br class=""><br class="">which is not very helpful.<br class=""><br class="">Here is a minimal example of an apple script which successfully typesets a file in TeXShop and displays the resulting pdf file<br class=""><br class="">set texfile to "/Users/tkiffe/Documents/textests/gentle.tex"<br class="">tell application "/Applications/TeX/TeXShop.app"<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>activate<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>open texfile<br class="">end tell<br class=""><br class=""><br class="">In this case it is obvious that the object of the open command is the file to open. It is not obvious to me what the object of the sync_to_preview command should be. This applies to all 4 sync commands in TeXShop’s Applescript dictionary. Any help would be greatly appreciated.<br class=""><br class="">TIA,<br class="">Tom<br class=""><br class=""><br class="">----------- Please Consult the Following Before Posting -----------<br class="">TeX FAQ: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.tex.ac.uk_faq&d=DwIGaQ&c=-35OiAkTchMrZOngvJPOeA&r=u80q3uxL9pTWIHtkmtNZRA&m=RcwnFnEa7GCQlEFms8NF3jwIyRHaNt5m2kyo4zxffP4&s=qBD4ZV8ZdRZQLpvrBE4t6elYfJ2R7pyF4J68buXdadM&e=" class="">https://urldefense.proofpoint.com/v2/url?u=http-3A__www.tex.ac.uk_faq&d=DwIGaQ&c=-35OiAkTchMrZOngvJPOeA&r=u80q3uxL9pTWIHtkmtNZRA&m=RcwnFnEa7GCQlEFms8NF3jwIyRHaNt5m2kyo4zxffP4&s=qBD4ZV8ZdRZQLpvrBE4t6elYfJ2R7pyF4J68buXdadM&e=</a> <br class="">List Reminders and Etiquette: <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__sites.esm.psu.edu_-7Egray_TeX_&d=DwIGaQ&c=-35OiAkTchMrZOngvJPOeA&r=u80q3uxL9pTWIHtkmtNZRA&m=RcwnFnEa7GCQlEFms8NF3jwIyRHaNt5m2kyo4zxffP4&s=coDvkM7tLs2qmWXY9LwCEm-eS46L8SM47yn8VgRKdIo&e=" class="">https://urldefense.proofpoint.com/v2/url?u=https-3A__sites.esm.psu.edu_-7Egray_TeX_&d=DwIGaQ&c=-35OiAkTchMrZOngvJPOeA&r=u80q3uxL9pTWIHtkmtNZRA&m=RcwnFnEa7GCQlEFms8NF3jwIyRHaNt5m2kyo4zxffP4&s=coDvkM7tLs2qmWXY9LwCEm-eS46L8SM47yn8VgRKdIo&e=</a> <br class="">List Archives: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__dir.gmane.org_gmane.comp.tex.macosx&d=DwIGaQ&c=-35OiAkTchMrZOngvJPOeA&r=u80q3uxL9pTWIHtkmtNZRA&m=RcwnFnEa7GCQlEFms8NF3jwIyRHaNt5m2kyo4zxffP4&s=4t4TeXt4AdvFcP02YOTJ8jQlOAVpjhRAxyGBUaJpCxg&e=" class="">https://urldefense.proofpoint.com/v2/url?u=http-3A__dir.gmane.org_gmane.comp.tex.macosx&d=DwIGaQ&c=-35OiAkTchMrZOngvJPOeA&r=u80q3uxL9pTWIHtkmtNZRA&m=RcwnFnEa7GCQlEFms8NF3jwIyRHaNt5m2kyo4zxffP4&s=4t4TeXt4AdvFcP02YOTJ8jQlOAVpjhRAxyGBUaJpCxg&e=</a> <br class=""> <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__email.esm.psu.edu_pipermail_macosx-2Dtex_&d=DwIGaQ&c=-35OiAkTchMrZOngvJPOeA&r=u80q3uxL9pTWIHtkmtNZRA&m=RcwnFnEa7GCQlEFms8NF3jwIyRHaNt5m2kyo4zxffP4&s=koG76POHAGst9X35WFLadCMwSJYxRPkSyOA4gklzeis&e=" class="">https://urldefense.proofpoint.com/v2/url?u=https-3A__email.esm.psu.edu_pipermail_macosx-2Dtex_&d=DwIGaQ&c=-35OiAkTchMrZOngvJPOeA&r=u80q3uxL9pTWIHtkmtNZRA&m=RcwnFnEa7GCQlEFms8NF3jwIyRHaNt5m2kyo4zxffP4&s=koG76POHAGst9X35WFLadCMwSJYxRPkSyOA4gklzeis&e=</a> <br class="">TeX on Mac OS X Website: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__mactex-2Dwiki.tug.org_&d=DwIGaQ&c=-35OiAkTchMrZOngvJPOeA&r=u80q3uxL9pTWIHtkmtNZRA&m=RcwnFnEa7GCQlEFms8NF3jwIyRHaNt5m2kyo4zxffP4&s=g9x__uCsyTqKO6OVCYkQtRPoX925DhBo0CeTcxsi2Rc&e=" class="">https://urldefense.proofpoint.com/v2/url?u=http-3A__mactex-2Dwiki.tug.org_&d=DwIGaQ&c=-35OiAkTchMrZOngvJPOeA&r=u80q3uxL9pTWIHtkmtNZRA&m=RcwnFnEa7GCQlEFms8NF3jwIyRHaNt5m2kyo4zxffP4&s=g9x__uCsyTqKO6OVCYkQtRPoX925DhBo0CeTcxsi2Rc&e=</a> <br class="">List Info: <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__email.esm.psu.edu_mailman_listinfo_macosx-2Dtex&d=DwIGaQ&c=-35OiAkTchMrZOngvJPOeA&r=u80q3uxL9pTWIHtkmtNZRA&m=RcwnFnEa7GCQlEFms8NF3jwIyRHaNt5m2kyo4zxffP4&s=cv7VxPTrrdAAE299ugXL15SnLFx5zviEOi-dK2Io2Bk&e=" class="">https://urldefense.proofpoint.com/v2/url?u=https-3A__email.esm.psu.edu_mailman_listinfo_macosx-2Dtex&d=DwIGaQ&c=-35OiAkTchMrZOngvJPOeA&r=u80q3uxL9pTWIHtkmtNZRA&m=RcwnFnEa7GCQlEFms8NF3jwIyRHaNt5m2kyo4zxffP4&s=cv7VxPTrrdAAE299ugXL15SnLFx5zviEOi-dK2Io2Bk&e=</a> <br class=""></div></div></blockquote></div><br class=""></div></body></html>