Perhaps I don't understand. Perhaps, there are exceptions to this generalization.
For example, consider the standard "button" Cmds - Icons - Insert-Icon. While there is a mini-buffer command insert-icon, I can't find any attribute of the commander that might correspond to insert-icon. Hence, I'm unable to use the "Invoking Commands from Scripts" recipe.
And in fact, this scheme does work in this case for a Leo-Editor script:
c.executeMinibufferCommand('insert-icon')
But it does NOT do what I want to do. It pops up a file browser and it requires the user to pick an icon. I want to assign icons that I pick when I write my script. I want unattended script operation.
When I use this scheme from a Python script that uses leoBridge, the script does nothing and does not report any error. Of course, it doesn't have any hope of doing what I want, because there is no way for my Python script to specify the icon to be used.
Edward K. Ream (edreamleo) wrote on 2013-03-25:
Are you aware that anything you do in an @button or @command node is
available to scripts?
------
Thank you for responding.
To answer your question: Yes--and NO. I have been aware of this claim for a long time. I've also read:
http:// webpages. charter. net/edreamleo/ scripting. html#invoking- commands- from-scripts
Perhaps I don't understand. Perhaps, there are exceptions to this generalization.
For example, consider the standard "button" Cmds - Icons - Insert-Icon. While there is a mini-buffer command insert-icon, I can't find any attribute of the commander that might correspond to insert-icon. Hence, I'm unable to use the "Invoking Commands from Scripts" recipe.
I'm also aware of this scheme:
https:/ /groups. google. com/forum/ ?fromgroups= #!topic/ leo-editor/ 3YjB8RjUbr0
And in fact, this scheme does work in this case for a Leo-Editor script:
c.executeMinibu fferCommand( 'insert- icon')
But it does NOT do what I want to do. It pops up a file browser and it requires the user to pick an icon. I want to assign icons that I pick when I write my script. I want unattended script operation.
When I use this scheme from a Python script that uses leoBridge, the script does nothing and does not report any error. Of course, it doesn't have any hope of doing what I want, because there is no way for my Python script to specify the icon to be used.