How to get a list of loaded projects and macros in Addin Project?
Best Answers
-
Hi Wesan,
MediaCy.Addins.Scripting.MacroSelector - is a combobox control with projects/macros, used in batch processing macro selector.
Thanks,
Nikita.0 -
Hi Wesan,
If you are using an App interface, and I recommend that you do, you can add a macro selector :
In the macro selector's on selected index changed method, you can split the selected macro into the project + module and macro name:Private Sub macroSelector1_SelectedIndexChanged(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles macroSelector1.SelectedIndexChanged Dim macroParts As String() = macroSelector1.SelectedMacro.ToString.Split(New Char() {"|"c}) Module1.setMacro1(macroParts(0), macroParts(1)) End Sub
You can then use these strings in the code that runs your selected macro:If macroFile1 <> Nothing And macroName1 <> Nothing Then With Automate.ScriptingCommands.PlayMacro(Nothing) .MacroFile = macroFile1 .MacroName = macroName1 .Run(Nothing, Nothing) End With Else MsgBox("No Macro Set", VbMsgBoxStyle.vbExclamation, "Error") Exit Function End If
I hope this helps!
Andrew
0
Answers
-
Thanks Nikita, Thanks Andrew,
I should have asked earlier. I never knew it was possible to use these components.
Wesan
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