Keyboard Shortcut to Run Macro Question (Image-Pro 10)
Hello,
I would like to set keyboard shortcuts for various macro functions I have already coded. However, looking at the previous questions on this forum has not been very helpful.
Here is the macro code I have now, which is not yet operating as I do not know what to enter If/When:
I would like to set keyboard shortcuts for various macro functions I have already coded. However, looking at the previous questions on this forum has not been very helpful.
Here is the macro code I have now, which is not yet operating as I do not know what to enter If/When:
Public Function Auto_All() As SimpleScript
Auto_All = New SimpleScript
Auto_All.Shortcut = MediaCy.IQL.Application.mcScriptShortcut.CtrlW
With Automate.ScriptingCommands.CodeCommand(Auto_All)
If .Run() Then
'not sure what to put here, previous post said "user code"
End If
End With
'Rest of macro code
Here is the app button click code:Public Sub button6_Click(sender As Object, e As System.EventArgs) Handles button6.Click
Auto_All()
End Sub
Does anyone know what user code I would enter to create the shortcut to run the macro? Thank you!0
Answers
Yuri
No, there is a pop-up window that states "ChangeType operation is not supported".
Here is the macro code just in case:
Public Function Auto_All() As SimpleScript Auto_All = New SimpleScript Auto_All.Shortcut = MediaCy.IQL.Application.mcScriptShortcut.CtrlW With Automate.ScriptingCommands.CodeCommand(Auto_All) If .Run() Then End If End With Dim trdoc1 With Application.RibbonCommands.SelectRibbonTab(Auto_All) .TabName = "TrackingTab" .Run() End With With Application.DocumentCommands.Active(Auto_All) .Run(trdoc1) End With With Measure.TrackingCommands.FindTracksAuto(Auto_All) .Interactive = True .Run(trdoc1) End With With Application.RibbonCommands.SelectRibbonTab(Auto_All) .TabName = "Share" .Run() End With Measure.Data.CollectorCommands.Clear(Auto_All).Run() With Measure.Data.CollectorCommands.Collect(Auto_All) .Run(New List({trdoc1})) End With End Function
Yuri