I don't know what the create-button script does, but if you want something
quick and dirty for occasional use, you could embed the script's id and
print that. The script's node identifier is p.gnx,so if you add lines to
your script like
id = 'TomP.20200419185110.1'
g.es(id)
it would identify your script's node. Or you could just put in the name of
the node directly and use that.
On Sunday, April 19, 2020 at 12:01:25 PM UTC-4, Matt Wilkie wrote:
>
> How do I get the name/position of a script bound to a button, regardless
> of what node is currently selected when the button is used?
>
> The goal is make it clear in the Log pane where the status message is
> coming from (the script).
>
> So far I'm using `c.p.h` to report the name like this:
>
> g.es_print("====", c.p.h, "====")
>
>
> This works fine when I fire the script with Ctrl-B. Howevre after binding
> the script to a button it reports the currently selected node, which can be
> anywhere, and not the script's name.
>
> thanks!
>
> -matt
>
--
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/3fd1168c-083e-4291-8082-010d3174e421%40googlegroups.com.