Home Image-Pro Plus Automation with Macros

How to Close a Dialog Box before Calling a Macro

(Originally posted by Masse on 3/24/2006)

How do I close a dialog box before calling a macro?:

example :

"""
Sub interface()

Begin Dialog...
text...
list...
End Dialog

show Dialog
End Sub


Function ...
case1
case2
case "function1" 'pushbutton
case "function2" 'pushbutton
Call MACRO()
End Select
End Select
End Function
"""
I would like close the Dialog box before Calling MACRO().

 

 

Comments

  • (Originally posted by YuriG on 3/24/2006)

    You can exit the dialog and check the button index.

    Dim dlg As UserDialog
    ShowDlg:
    ret=Dialog(dlg)
    if ret=2 then 'check the button
    Call MACRO()
    GoTo ShowDlg 'display dialog again after executing the macro
    end if


    Look at IPBasic Help on "DialogFunc Prototype" or "Dialog Instruction/Function" pages for more examples.

     

Sign In or Register to comment.