General XMetaL Discussion
queshaw April 11, 2019 at 9:17 pm
Modify selected elements?April 11, 2019 at 9:17 pmParticipants 1Replies 2Last Activity 3 years, 5 months ago
I need to write a macro/script/program that alters the XML that the user has selected. In this case, the selection is expected to contain OASIS table rows. How can I find what is “selected”, i.e. elements that are highlighted after the user dragged a selection with the mouse?
I read 2 posts roughly asking the same question. One answer uses IsInsertionPoint and suggests moving ranges around, but I have no idea how that would tell me what elements are highlighted.
Another post uses Duplicate and Collapse, but when I try that it does not give me the elements that are highlighted by the user. Or, it gives me the parent of the elements that are highlighted, neither of which tell me what is highlighted. How can I do this?
KendallDerek Read April 15, 2019 at 6:58 pm
Reply to: Modify selected elements?April 15, 2019 at 6:58 pm
See my reply here, third in the thread:
The two relevant APIs are:
If you can provide more information about what you need to accomplish I might be able to suggest something in more detail. Keep in mind that the actual end result (and starting condition) is the most important thing here as sometimes you can get there multiple ways.
- You must be logged in to reply to this topic.