Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2007
    Location
    Netherlands
    Posts
    81

    stepping through tutorial via Page Down and Page Up

    Hi everyone,

    My project is a 20-page tutorial where I made navigation buttons at the bottom to go to the Next Page, Main Menu en Previous Page (and exit).
    I would like to give the user the possibility to step through the tutorial using the Page Up and Page Down key.

    Could someone please point me into the right direction? This is what I think I have to do, but it's not complete:

    In Project Explorer I "click on the line Project.
    In the Properties pane I click on the line On Key... to open the Script window.
    I click on the button Add Action and choose Page.Navigate (PAGE_Next);

    However this will take me only from page 1 to page 2 of my tutorial pressing any key. What do I have to change so that pressing only Page Down key will take the user to the next page of my tutorial, and the next and the next (not just from the opening page to page 2?

    Thanks in advance for your help!

    Loes

  2. #2
    Join Date
    Jul 2002
    Location
    Just South of Reality
    Posts
    778
    Loes

    One way to accomplish the Page Up/Down - Place this in the On Key tab of a page:

    Code:
    if e_Key == 33 then	
    	Dialog.Message("Page Up", ""); -- place your page navigate here
    elseif e_Key == 34 then
    	Dialog.Message("Page Down", ""); --place your page navigate here
    end
    All the key codes are found in [help > Miscellaneous > Virtual Key Codes]

    This test would need to be placed on each page, since it is a Page event.


    hth
    Last edited by holtgrewe; 01-23-2008 at 07:45 AM.

  3. #3
    Join Date
    Dec 2007
    Location
    Netherlands
    Posts
    81
    Thanks for the quick reply!
    It works like a charm (I didn't put in the Dialog Window, because I just want to step through the tutorial without confirming it in a window).

    Here's the code I used successfully with your help - perhaps someone else can use it too .

    To step through a project using Page up/down and also to be able to go to the last visited page using the Backspace key, put the following action in the On Key tab of each page:

    if e_Key == 33 then
    Page.Navigate(PAGE_PREVIOUS);
    elseif e_Key == 34 then
    Page.Navigate(PAGE_NEXT);
    elseif e_Key == 8 then
    Page.Navigate(PAGE_BACKWARD);
    end
    Thanks again!
    Loes
    Last edited by Loes; 01-23-2008 at 08:50 AM. Reason: added line of code

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts