Home Image-Pro Automation (Macros, Apps, Reports)
Options

Is there a one line version to activate an image by name? like second function?

  Public Function ActivateDoc(strImgName As String) As SimpleScript
        'eg. strImg = "C:\Users\Public\Documents\Image-Pro Premier 9.1 64-bit (Shared)\Demo Images\Color\Tumor.tif"
        'eg. strImgName = "Tumor.tif"
        'eg. strImgName = doc1.Name

        ActivateDoc = New SimpleScript
        Dim var1 = strImgName, doc1

        With Application.DocumentCommands.Activate(ActivateDoc)
            .Run(var1, doc1)
        End With

    End Function



    Public Function F_ActivateDoc(strImgName As String)

        'how can I "activate" a specific image or select a specific image to process using the ThisApplication style ?


        ThisApplication.???.Activate(strImgName)




    End Function

Best Answer

  • Options
    Answer ✓
    Hello,

    Yes you can use:

        Sub Activate
            ThisApplication.Windows(strImgName).Activate()
    End Sub

    Pierre
Sign In or Register to comment.