<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">We already have an answer. I have also attached the relevant part of the user manual.<br>
<br>
Gary<br>
<br>
</div>
</span></font></div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText"><br>
<br>
----------------------------------------------------------<br>
Hi Gary,<br>
<br>
Thanks for writing again and in answer to your questions, based on this:<br>
<br>
>>> But, I have not tried to implement the reverse syncing, <br>
>>> from BBEdit to TexShop, and it’s not very clear to me <br>
>>> exactly how to go about it, especially since my experience<br>
>>> with AppleScript is quite limited.<br>
<br>
>> 1) Can BBEdit issue an applescript command?<br>
<br>
Yes, you can run an AppleScript within BBEdit at any time via its Scripts menu or an assigned key shortcut.<br>
<br>
<br>
>> 2) If not, can BBEdit call a shell script?<br>
<br>
Yes, in the exact same manners as above. :-)<br>
<br>
<br>
>> 3) Suppose the user clicks a spot in a BBEdit file while holding down the command key, or possibly some other key. Can this event a user defined command? Can it trigger 1) or 2)?<br>
>> <br>
<br>
Since Command-right click will invoke the contextual menu (as usual for Mac apps) I presume you're referring to a Command-left click and if so, this gesture has no ordinary result _unless_ applied to an URL (in which case BBEdit will attempt to resolve same),
 but cannot (currently) be bound to any other action.<br>
<br>
However, based on the thread below, if you're looking for a convenient way to make an action within BBEdit cause something to happen in an external app, may I suggest you consider making use of BBEdit's event attachment support, such as 'documentDidSave', to
 perform a scripted action every time you save the frontmost (active) document within BBEdit.<br>
<br>
[For complete details, please see the section "Attaching Scripts to Events" in Chapter 13 of the included PDF manual, and you're welcome to share the relevant excerpts with the original inquirer and/or list. :-)<br>
<br>
Regards,<br>
<br>
Patrick Woolsey<br>
<br>
> On Jun 22, 2021, at 3:23 PM, Richard Koch <koch@uoregon.edu> wrote:<br>
> <br>
> David,<br>
> <br>
> I'd also be interested in this. The next version of TeXShop, 4.65, will have enhanced syncing of this sort, particularly for users of ConTeXt. The questions I'd like to see answered are these:<br>
> <br>
>        1) Can BBEdit issue an applescript command?<br>
> <br>
>        2) If not, can BBEdit call a shell script?<br>
> <br>
>        3) Suppose the user clicks a spot in a BBEdit file while holding down the command key, or possibly some other key. Can this event a user defined command? Can it trigger 1) or 2)?<br>
> <br>
> If so, I'll add that information to the 4.65 Changes document.<br>
> <br>
> Richard Koch<br>
> <br>
>> On Jun 22, 2021, at 11:42 AM, David Goldenberg <Goldenberg@biology.utah.edu> wrote:<br>
>> <br>
>> Hi,<br>
>>  In versions 4.24 and 4.25 Richard Koch introduced the ability to sync between TexShop and external editors (4.24) and the reverse (4.25).  Since then, I have been using the sync from TexShop with BBEdit, and it works very well and is much appreciated. 
 But, I have not tried to implement the reverse syncing, from BBEdit to TexShop, and it’s not very clear to me exactly how to go about it, especially since my experience with AppleScript is quite limited.<br>
>> <br>
>> Has anyone else tried this with BBEdit? Any information would be greatly appreciated.<br>
>> <br>
>> Thanks,<br>
>> David Goldenberg<br>
>> —-<br>
>> School of Biological Sciences<br>
>> University of Utah<br>
>> 257 South 1400 East<br>
>> Salt Lake City, UT  84112-0840<br>
>> <br>
>> E-mail: goldenberg@biology.utah.edu<br>
>> Web page: <a href="https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgoldenberg.biology.utah.edu%2F&amp;data=04%7C01%7Ceuler%40psu.edu%7C9015cdf324a44aafbb6e08d935b3b9e0%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637599868298843275%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WbpoQAc2tXOiz0Hjp9u81UwKVGXQf83yEMOnxyldCQ8%3D&amp;reserved=0">
https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgoldenberg.biology.utah.edu%2F&amp;data=04%7C01%7Ceuler%40psu.edu%7C9015cdf324a44aafbb6e08d935b3b9e0%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637599868298843275%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=WbpoQAc2tXOiz0Hjp9u81UwKVGXQf83yEMOnxyldCQ8%3D&amp;reserved=0</a><br>
>> <br>
>> <br>
>> <br>
>> <br>
>> <br>
>> ----------- Please Consult the Following Before Posting -----------<br>
>> TeX FAQ: <a href="https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.tex.ac.uk%2Ffaq&amp;data=04%7C01%7Ceuler%40psu.edu%7C9015cdf324a44aafbb6e08d935b3b9e0%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637599868298843275%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=J5S3CahvYPjOsOZxfXl5MAjRXAGqN4GXyVlVOHjMUN0%3D&amp;reserved=0">
https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.tex.ac.uk%2Ffaq&amp;data=04%7C01%7Ceuler%40psu.edu%7C9015cdf324a44aafbb6e08d935b3b9e0%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637599868298843275%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=J5S3CahvYPjOsOZxfXl5MAjRXAGqN4GXyVlVOHjMUN0%3D&amp;reserved=0</a><br>
>> List Reminders and Etiquette: <a href="https://sites.esm.psu.edu/~gray/TeX/">https://sites.esm.psu.edu/~gray/TeX/</a><br>
>> List Archives: <a href="https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdir.gmane.org%2Fgmane.comp.tex.macosx&amp;data=04%7C01%7Ceuler%40psu.edu%7C9015cdf324a44aafbb6e08d935b3b9e0%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637599868298843275%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=M7POYGVA5WgrAIs%2BO6BZOUvSnMzK%2B9Q6JCBqWlgAfck%3D&amp;reserved=0">
https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdir.gmane.org%2Fgmane.comp.tex.macosx&amp;data=04%7C01%7Ceuler%40psu.edu%7C9015cdf324a44aafbb6e08d935b3b9e0%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637599868298843275%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=M7POYGVA5WgrAIs%2BO6BZOUvSnMzK%2B9Q6JCBqWlgAfck%3D&amp;reserved=0</a><br>
>>               <a href="https://email.esm.psu.edu/pipermail/macosx-tex/">https://email.esm.psu.edu/pipermail/macosx-tex/</a><br>
>> TeX on Mac OS X Website: <a href="https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmactex-wiki.tug.org%2F&amp;data=04%7C01%7Ceuler%40psu.edu%7C9015cdf324a44aafbb6e08d935b3b9e0%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637599868298843275%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=uOynq8xj2i7LJ7BqfK9JGI3Vo4p8RPvEGJN%2F3aPn8Eg%3D&amp;reserved=0">
https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmactex-wiki.tug.org%2F&amp;data=04%7C01%7Ceuler%40psu.edu%7C9015cdf324a44aafbb6e08d935b3b9e0%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637599868298843275%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=uOynq8xj2i7LJ7BqfK9JGI3Vo4p8RPvEGJN%2F3aPn8Eg%3D&amp;reserved=0</a><br>
>> List Info: <a href="https://email.esm.psu.edu/mailman/listinfo/macosx-tex">https://email.esm.psu.edu/mailman/listinfo/macosx-tex</a><br>
> <br>
> ----------- Please Consult the Following Before Posting -----------<br>
> TeX FAQ: <a href="https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.tex.ac.uk%2Ffaq&amp;data=04%7C01%7Ceuler%40psu.edu%7C9015cdf324a44aafbb6e08d935b3b9e0%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637599868298843275%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=J5S3CahvYPjOsOZxfXl5MAjRXAGqN4GXyVlVOHjMUN0%3D&amp;reserved=0">
https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.tex.ac.uk%2Ffaq&amp;data=04%7C01%7Ceuler%40psu.edu%7C9015cdf324a44aafbb6e08d935b3b9e0%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637599868298843275%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=J5S3CahvYPjOsOZxfXl5MAjRXAGqN4GXyVlVOHjMUN0%3D&amp;reserved=0</a><br>
> List Reminders and Etiquette: <a href="https://sites.esm.psu.edu/~gray/TeX/">https://sites.esm.psu.edu/~gray/TeX/</a><br>
> List Archives: <a href="https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdir.gmane.org%2Fgmane.comp.tex.macosx&amp;data=04%7C01%7Ceuler%40psu.edu%7C9015cdf324a44aafbb6e08d935b3b9e0%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637599868298843275%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=M7POYGVA5WgrAIs%2BO6BZOUvSnMzK%2B9Q6JCBqWlgAfck%3D&amp;reserved=0">
https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdir.gmane.org%2Fgmane.comp.tex.macosx&amp;data=04%7C01%7Ceuler%40psu.edu%7C9015cdf324a44aafbb6e08d935b3b9e0%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637599868298843275%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=M7POYGVA5WgrAIs%2BO6BZOUvSnMzK%2B9Q6JCBqWlgAfck%3D&amp;reserved=0</a><br>
>                <a href="https://email.esm.psu.edu/pipermail/macosx-tex/">https://email.esm.psu.edu/pipermail/macosx-tex/</a><br>
> TeX on Mac OS X Website: <a href="https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmactex-wiki.tug.org%2F&amp;data=04%7C01%7Ceuler%40psu.edu%7C9015cdf324a44aafbb6e08d935b3b9e0%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637599868298843275%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=uOynq8xj2i7LJ7BqfK9JGI3Vo4p8RPvEGJN%2F3aPn8Eg%3D&amp;reserved=0">
https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmactex-wiki.tug.org%2F&amp;data=04%7C01%7Ceuler%40psu.edu%7C9015cdf324a44aafbb6e08d935b3b9e0%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C0%7C637599868298843275%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=uOynq8xj2i7LJ7BqfK9JGI3Vo4p8RPvEGJN%2F3aPn8Eg%3D&amp;reserved=0</a><br>
> List Info: <a href="https://email.esm.psu.edu/mailman/listinfo/macosx-tex">https://email.esm.psu.edu/mailman/listinfo/macosx-tex</a><br>
<br>
</div>
</span></font></div>
</body>
</html>