Announcement

Collapse
No announcement yet.

Page.Jump on Condition

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Page.Jump on Condition

    Whenever the var=OFF the menu quits as expected. When it is supposed to jump, the menu opens and hangs, and doesn't redraw. It seems like it is expecting something that doesn't exist. So I tried it with blank jumpto pages and it still hangs. I also tried a 2 condition IF ELSE example from a post, and it didn't work.


    %Read_AutoPlayDVD% = Registry.GetValueData ("HKEY_CLASSES_ROOT\Software\MySoftware", "AutoPlayDVD")

    IF (%Read_AutoPlayDVD% = OFF)
    Application.Exit
    END IF

    IF (%Read_AutoPlayDVD% = ON)
    Page.Jump ("Research")
    END IF

    IF ((%Read_AutoPlayDVD% <> ON) AND (%Read_AutoPlayDVD% <> OFF))
    Page.Jump ("Main Menu")
    END IF

  • #2
    Re: Page.Jump on Condition

    != is the NOT EQUAL TO operator in AutoPlay Media Studio, change your instances of <> to != and you should be OK...

    Corey Milner
    Creative Director, Indigo Rose Software

    Comment


    • #3
      Re: Page.Jump on Condition

      Actually Corey, <> and != both work fine in 4.0. I designed it that way to be familiar to both VB users and C++ users.
      --[[ Indigo Rose Software Developer ]]

      Comment


      • #4
        Re: Page.Jump on Condition


        Whenever the var=OFF the menu quits as expected. When it is supposed to jump, the menu opens and hangs, and doesn't redraw. It seems like it is expecting something that doesn't exist. So I tried it with blank jumpto pages and it still hangs. I also tried a 2 condition IF ELSE example from a post, and it didn't work.
        Sounds like some kind of endless loop. Looking at your code, there doesn't seem to be anything wrong with it. If I had to take a wild guess, I'd say you had actions on one of those pages' events that are jumping back to this page, causing an endless loop of jumping back and forth. Either that, or something on one of the pages you're jumping to is causing problems.

        I don't think this is the problem, but: it wouldn't hurt to make sure the names in those Page.Jump actions match the names of the actual pages. And that those pages actually exist. [img]/ubbthreads/images/icons/smile.gif[/img]

        A good approach would be to find out where the problem is occurring. Try adding Dialog.Message actions to display a message at different points in the script, so you can see which parts are succeeding and what parts aren't being reached. It might not be those actions at all.
        --[[ Indigo Rose Software Developer ]]

        Comment


        • #5
          Re: Page.Jump on Condition

          I think I got it now. I was putting in the dialogs as you said and really wasn't getting anywhere. I finally moved the actions from project settings to the settings of the primary page. Now it jumps to Page 2 as desired. Is that the way it is supposed to be? Does Page.Jump not work from project settings?

          Thanks,
          Terry

          Comment


          • #6
            Re: Page.Jump on Condition

            "Does Page.Jump not work from project settings?"

            I'm guessing here, but i would say no. During Project initialization the pages are not accessible for jumping to. So it would be like jumping to a page that doesnt exist.
            -
            = Derek
            ["All glory comes from daring to begin" - fortune cookie]

            Comment


            • #7
              Re: Page.Jump on Condition

              Bing bing bing! Derek's right on the money. The pages haven't been created yet when Project Init is triggered.
              --[[ Indigo Rose Software Developer ]]

              Comment

              Working...
              X