Enumerate MoI commands from a startup script?
All  1-3  4-5

Previous
Next
 From:  Larry Fahnoe (FAHNOE)
10349.4 In reply to 10349.2 
Hi Michael,

Well I replied a bit too soon... ;-}

So of the 62 buttons, there are 32 with command attributes 20 with commanset attributes, 7 with onclick attributes and 3 that are visibility:hidden. How would I go about finding the commands within the commandsets? Earlier I'd written a little script to dump the nodes of the moi.ui.sidePane.document, but I didn't find any hints about how to see the contents of the commandsets. I suppose I could parse the commands/*.xml files, but I'm guessing that MoI already has done that.

--Larry
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Michael Gibson
10349.5 In reply to 10349.4 
Hi Larry, yes you would need to load the xml files and go through their contents. MoI does not do that itself on load, it's done dynamically on demand when a command set is triggered. Until it has been triggered the side pane nor Moi's main code does not yet know anything about the contents of it.

So enumerating *.js files in the commands folder may be a better method.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1-3  4-5