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

Close active image in macro

Hello
Can someone please tell me how I can end a macro by closing the active image? I tried to use the macro recorder but was unsuccessful.
Any help greatly appreciated.
Thanks
Johnny

Best Answer

  • Answer ✓
    Hi Johnny,

    Activating the recording and closing the image should produce a proper macro.
    Here is how it should be recorded: 

    Public Function CloseActiveImage() As SimpleScript CloseActiveImage = New SimpleScript Dim window1 With Application.WindowCommands.Active(CloseActiveImage) .Run(window1) End With With Application.WindowCommands.Close(CloseActiveImage) .Run(window1) End With End Function
    Regards,

    Yuri
Sign In or Register to comment.