is there a function to close a window using a macro? I don’t see one.. Thanks Bob
Hi @rswolff,
There is no direct way to close a window from a macro. However, the method we recommend is to use an Action Trigger on the window page that closes the window after a short delay. To activate that Action Trigger, you can monitor a bit or word address for a value change. Then, your macro can change that address value to trigger the close action.
Action Trigger Per Page that closes window when LB-0 is turned on
Macro used to turn LB-0 on and off
macro_command main()
bool on = true
bool off = false
SetData(on, "Local HMI", LB, 0, 1)
DELAY(50)
SetData(off, "Local HMI", LB,0,1)
end macro_command
that answers my question but only means you can’t close a popup(s) from a macro… or basically any other means except a close window button on the popup. which is what I was attempting to do. Made the application a bit more cumbersome but no terrible impact. Would be a nice function to have however. Thanks, Bob
Hi @rswolff ,
Glad to hear the work around solved your problem. We will also note your suggestion for our developers.
Thank you for your contribution!
