0 votes
I am working with Claude Cowork trying to build a figure-insertion workflow for Paratext using Python scripts and Excel spreadsheets that have information about the images I may want to use. The spreadsheets include scripture references. I would love to be able to click on a scripture reference in the spreadsheet and have Paratext turn to that verse. I know Paratext can communicate BCV focus with various other software tools, but is there any way to trigger it from Excel?
All wild ideas welcome.
John Nystrom
Paratext by (310 points)

2 Answers

+1 vote

The normal BCV synchronization happens by setting values in the Windows Registry (HKCU\Software\SantaFe\Focus\ScriptureReference) and then sending a custom Windows message that was registered via a call to RegisterWindowMessage in the application with the parameter "SantaFeFocus". I don't think that's possible via an Excel script / macro.

Something that might work, but would be complicated to set up, is to create a custom URL protocol and create a small application that can forward the URL parameter to the Registry location mentioned above and then fire the Windows message mentioned above. Then you can create a link in Excel that uses that custom protocol - which, when clicked, would run that small application.

Something else that might work, but would also be complicated to set up, would be to create a PT9 plugin that can handle some kind of signal from Excel, but I'm not sure if that's possible as I'm not real familiar with Excel scripts / macros.

I think those qualify as wild ideas. wink

by [Expert]
(16.6k points)

Claude says: 

This is actually very doable. The developer laid out exactly what's needed — we just need to build the three pieces:

  1. A small Python script that receives a paratext://LUK 19.4 URL, writes the reference to the registry, and broadcasts the Windows message
  2. A one-time setup script that registers the paratext:// protocol in Windows so clicking such a link invokes our script
  3. Updates to the spreadsheet scripts to write paratext:// hyperlinks onto verse reference cells

Want me to build all three? The main unknown is the exact reference format Paratext expects in the registry value — we may need one test click to confirm whether it wants LUK 19.4 or LUK 19:4. Everything else is straightforward.

Paratext linksACT 2.1/

that turn Paratext to a specific BCV focus are now working in my spreadsheet. Claude could not make it work via the registry, so it wrote a Python script to make it work by another method. It brings Paratext to the foreground, then types Ctrl-B and enters the BCV info. Paratext_bcv_handler.py. It's in this folder with the other files for this project. These files may not be kept up to date in this folher as I refine this process. 

0 votes

Scrolling with Paratext requires 2 things:

  1. Putting the destination reference in a registry setting
  2. Sending a custom Windows Message

I'm not sure how to do either of these from Excel, but maybe a VB script could do it. I can provide more details if you find you can do these steps.

by [Administrator]
(3.4k points)
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
I urge you, brothers and sisters, to watch out for those who cause divisions and put obstacles in your way that are contrary to the teaching you have learned. Keep away from them.
Romans 16:17
3,032 questions
5,987 answers
5,653 comments
2,020 users