Problem with using mouseclick in macro to select callouts on illustration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Problem with using mouseclick in macro to select callouts on illustration
I'm trying to get a macro to select callouts but get errors
This is a little macro that illustrates my problem
macro test_me
define me as MouseEvent
define el as element
me = Wait MouseClick
Select at me.ptmm.x me.ptmm.y Direct
el = ActiveDoc.FirstSelectedElement
MESSAGE el.type
end macro
When run this macro just displays the selected element type - "Line" or "Bezier" etc.
But if you click on a callout it gives the following error message:
Macro: Error in expression syntax.
"MESSAGE el.type"
Anyone have any advice?
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Try the following. Looks like the direct comment is selecting within the callout possibly. Remove that and the issue seems to be resolved.
macro test_me
define me as MouseEvent
define el as element
me = Wait MouseClick
Select at me.ptmm.x me.ptmm.y
el = ActiveDoc.FirstSelectedElement
MESSAGE el.type
end macro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Try the following. Looks like the direct comment is selecting within the callout possibly. Remove that and the issue seems to be resolved.
macro test_me
define me as MouseEvent
define el as element
me = Wait MouseClick
Select at me.ptmm.x me.ptmm.y
el = ActiveDoc.FirstSelectedElement
MESSAGE el.type
end macro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks Trevor
Never thought to do that, it works a treat so hopefully I can finish my macro now.