PDA

View Full Version : stepping through tutorial via Page Down and Page Up


Loes
01-23-2008, 08:07 AM
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

holtgrewe
01-23-2008, 08:33 AM
Loes

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

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

Loes
01-23-2008, 09:39 AM
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