Making script in Leo is great, with the globally defined vars g, c and p 
anything is possible. 

But what is the recommended way of doing a simple command by name in a 
script?

The *c.doCommandByName* method exists, but it insists on having an event as 
a second parameter. 

I discovered that I can make it work by passing a fake event such as : 
{"c": c}, or even a better one: g.app.gui.create_key_event(c),  but this is 
quite unintuitive. Could it not default to a valid default event if the 
event is not passed?

Félix

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/68b44f92-c2fd-403b-97aa-58fba041d366n%40googlegroups.com.

Reply via email to