On Friday, June 30, 2023 at 10:17:35 PM UTC-4 Thomas Passin wrote:

I tested the script with the latest revision of the PR3215 branch that has 
all the UNL/GNX changes.  It still works, Glory Hallelujah!

On Wednesday, June 28, 2023 at 10:14:50 AM UTC-4 Edward K. Ream wrote:

On Wed, Jun 28, 2023 at 8:09 AM HaveF HaveF <[email protected]> wrote:

> Super useful function! It works! You save my day, Thomas!


Hmm, I must have posted that script in a different thread.  Here's the one 
I'm talking about:

UNL = 'unl://C:/Tom/git/leo-editor/leo/core/LeoPyRef.leo#Code-->Core 
classes-->@file leoGlobals.py-->g.Urls & UNLs-->g.handleUnl'

c0, p0 = c, c.p
c2 = g.handleUnl(UNL, c)
content = c2.p.b  # <---- here is the content of the UNL's body

if c2 is not c0:
    g.app.selectLeoWindow(c0)

c0.selectPosition(p0)
print(content[:100])  # To verify we got the right text

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/b307f3de-e8e8-412a-b33c-6587453e9f3fn%40googlegroups.com.

Reply via email to