Home AMX User Forum NetLinx Studio

page flag question

udiudi Posts: 107
I want to do some commands when I am in a specific page on the TP4.
For emample:
If (page_flag)
{
Do somthing
}
How can I do a flag to a page?
Thanks for any help.

Comments

  • Jorde_VJorde_V Posts: 393
    udi wrote: »
    I want to do some commands when I am in a specific page on the TP4.
    For emample:
    If (page_flag)
    {
    Do somthing
    }
    How can I do a flag to a page?
    Thanks for any help.

    You can track the pages, or like I do manage the pages from code instead of on the panel. That way you know when you're changing the page and you can do it that way.

    you can also ask the panel which page it is on. Command is something like 'PAGE?', but you can find that in the help file.
  • Joe HebertJoe Hebert Posts: 2,159
    SEND_COMMAND dvTP,’TPAGEON’ //turns page tracking on and the panel replies with name of the current page even if page tracking is already on.

    SEND_COMMAND dvTP,’TPAGEOFF’ //turns page tracking off
  • DHawthorneDHawthorne Posts: 4,584
    I put the TPAGEON command in the online event. Then I have a string event that monitors all the PAGE- and PPN, PPF strings that come in, so I can track what page I'm on, and whether specific popups are active. I don't track every single page because I don't need to, but just the ones I care about. However, it would be just as easy to store the current page.

    However, and this is a big one, page tracking does NOT track page flips from code, only those that happen in the panel itself. So when you flip a page in code, you have to update your tracking there as well.
  • udiudi Posts: 107
    DHawthorne wrote: »
    I put the TPAGEON command in the online event. Then I have a string event that monitors all the PAGE- and PPN, PPF strings that come in, so I can track what page I'm on, and whether specific popups are active. I don't track every single page because I don't need to, but just the ones I care about. However, it would be just as easy to store the current page.

    However, and this is a big one, page tracking does NOT track page flips from code, only those that happen in the panel itself. So when you flip a page in code, you have to update your tracking there as well.

    thanks I did what you said and it works great. By the way it does tracking me flips from the code
  • DHawthorneDHawthorne Posts: 4,584
    udi wrote: »
    thanks I did what you said and it works great. By the way it does tracking me flips from the code

    I vaguely remember someone else telling me that last time I asserted it, now that you do again. Perhaps it's firmware dependent ... I just know I once had that issue, and have just assumed it's still extant and allow for it whether I need to or not :).
Sign In or Register to comment.