How to display the [types] interface in macro?
Hi everyone
In my app design, I have a button that, when clicked, shows the [types] settings interface.
Simply navigating to this tab and automatically opening [types] would be sufficient.
Is there a way to perform the [open types] action? I’ve tried using [macro] to record it, but it came out blank.

Waiting for a response, thank you, everyone.
In my app design, I have a button that, when clicked, shows the [types] settings interface.
Simply navigating to this tab and automatically opening [types] would be sufficient.
Is there a way to perform the [open types] action? I’ve tried using [macro] to record it, but it came out blank.

Waiting for a response, thank you, everyone.
0
Best Answer
-
Hi Kyle,
The CSRibbon property is available only from IP version 11, so in 10.0.15 you should use other methods.
You can either use Key-tips Alt - S (to activate Count/Size ribbon), and ML to open the Types dialog:
Or use SendKeys to send mouse click to the Types button (using Screen coordinates), like this:Public Function ShowCountTypes() As SimpleScript ShowCountTypes = New SimpleScript With Application.RibbonCommands.SelectRibbonTab(ShowCountTypes) .TabName = "CountSize" .Run() End With With Automate.ScriptingCommands.CodeCommand(ShowCountTypes) If .Run() Then 'Click Types button SendKeys("{ClickLeft 320,80}")'screen coordinates of the Types button End If End With End Function
Regards,
Yuri
0
Answers
-
Hi Kyle,
Here is a macro that will expand the Types button:Public Function ShowCountTypes() As SimpleScript ShowCountTypes = New SimpleScript With Application.RibbonCommands.SelectRibbonTab(ShowCountTypes) .TabName = "CountSize" .Run() End With With Automate.ScriptingCommands.CodeCommand(ShowCountTypes) If .Run() Then ' Expand Types button Mediacy.Addins.Measurements.McMeasurements.ThisAddin.CSRibbon.ButtonMeasurements.Expanded = True End If End With End Function
Regards,
Yuri0 -
Hi YuriG,
Thanks for getting back to me. I’ve already tried using a macro, but I’m running into an issue with a missing [CSRibbon] reference. Is there something else I need to add?
My version is 10.0.15.
Waiting for a response, thank you.
0 -
Hi YuriG,
Many thanks, this works!
0
Categories
- All Categories
- 961 Image-Pro v9 and higher
- 9 Image-Pro FAQs
- 18 Image-Pro Download & Install
- 448 Image-Pro General Discussions
- 486 Image-Pro Automation (Macros, Apps, Reports)
- 20 AutoQuant Deconvolution
- 2 AutoQuant Download & Install
- 18 AutoQuant General Discussions
- 195 Image-Pro Plus v7 and lower
- 3 Image-Pro Plus Download & Install
- 106 Image-Pro Plus General Discussions
- 86 Image-Pro Plus Automation with Macros
- 19 Legacy Products
- 16 Image-Pro Premier 3D General Discussions
- 26 Image-Pro Insight General Discussions