Skip to main content
12-Amethyst
March 20, 2015
Question

acl is 'any' Editor dialogue open

  • March 20, 2015
  • 4 replies
  • 1231 views

Hi All,


Wondered if anyone knows an easy way to detect if 'any' dialogue is open, not just the main menu ones.


For example below, this works fine to prevent a message pop-up from coming when using 'message' in a timer loop and you open 'save as' dialogue. However open Ctrl-D / Modify Attributes, and you still get a pop-up with this message looping over the top.


Or if it is easier to show the status of something without using 'message' at all?


 dbActive = windows_disabled();

 if (dbActive != 1){

 message "Timer widget is active $nticks"

}


Many thanks


Chris

    4 replies

    1-Visitor
    March 20, 2015
    Take a look at window_list() to detect whether dialogs/windows are open.

    What do you want to do instead of message if a window is open? Just curious
    ...

    On Fri, Mar 20, 2015 at 3:47 AM, chris western <->
    wrote:

    > Hi All,
    >
    > Wondered if anyone knows an easy way to detect if 'any' dialogue is open,
    > not just the main menu ones.
    >
    > For example below, this works fine to prevent a message pop-up from coming
    > when using 'message' in a timer loop and you open 'save as' dialogue.
    > However open Ctrl-D / Modify Attributes, and you still get a pop-up with
    > this message looping over the top.
    >
    > Or if it is easier to show the status of something without using 'message'
    > at all?
    >
    > dbActive = windows_disabled();
    >
    > if (dbActive != 1){
    >
    > message "Timer widget is active $nticks"
    >
    > }
    >
    > Many thanks
    >
    > Chris
    >
    12-Amethyst
    March 21, 2015

    Thanks Paul, will look into that.



    I just want to use 'message' to show the user that my widget is running in the status bar, but without it creating a pop-up message when some diogues are opened, which looks to be the default behaviour.



    Thanks


    Chris


    18-Opal
    March 21, 2015
    Hi Chris—

    If you just want to post a message to the status bar that always goes to the status bar, you can use

    window_set(window_id, “message”, “Some status bar text to display”);

    instead of the message command.

    --Clay
    12-Amethyst
    March 24, 2015

    Great thanks Clay,


    I was clearly searching the docs for the wrong terms! 😉


    -C