Home Image-Pro General Discussions

Load Circles App settings file

I want my macro to open the Circles App and then prompt the user to choose a settings file based on their image type. I can get the App to open, and the Settings File Open window to open, but I can't get the settings file to activate. The problem may be that when I drag the Circle LoadOptions function into my macro, it changes the name to PlayMacro (see script below)

    Public Function Circles() As SimpleScript
        Circles = New SimpleScript

        With Application.RibbonCommands.SelectRibbonTab(Circles)
            .TabName = "Apps"
            .Run()
        End With

        With Automate.ScriptingCommands.AppGadget(Circles)
            .AppFile = "Circles>CirclesApp.vb"
            .Reload = True
            .CheckState = MediaCy.IQL.Application.McCommand.mcCheckState.Checked
            .Run()
        End With

        With Automate.ScriptingCommands.PlayMacro(Circles)
            .Text = "Load Options"
            .MacroFile = "Circles>*ModuleCircles.vb"
            .MacroName = "LoadOptions"
            .Prompt = "Choose appropriate settings file"
            .Interactive = True
            .Run(ThisApplication.ActiveImage)
        End With

Best Answer

  • Answer ✓
    Hi dcimaging,

    LoadOptions should not be interactive and you need to set new parameters to controls:
        Public Function Circles() As SimpleScript
            Circles = New SimpleScript
    
            With Application.RibbonCommands.SelectRibbonTab(Circles)
                .TabName = "Apps"
                .Run()
            End With
    
            With Automate.ScriptingCommands.AppGadget(Circles)
                .AppFile = "Circles>CirclesApp.vb"
                .Reload = True
                .CheckState = MediaCy.IQL.Application.McCommand.mcCheckState.Checked
                .Run()
            End With
    
            With Automate.ScriptingCommands.PlayMacro(Circles)
                .MacroFile = "Circles>ModuleCircles.vb"
                .MacroName = "LoadOptions"
                .Run(Nothing)
            End With
    
            With Automate.ScriptingCommands.PlayMacro(Circles)
                .MacroFile = "Circles>CirclesApp.vb"
                .MacroName = "SetControls"
                .Run(Nothing)
            End With
    
        End Function
    
    Thanks,
    Nikita.
    
    
Sign In or Register to comment.