
-----------------------------------
countergary
Tue Jan 25, 2005 6:08 pm

1 More thing!
-----------------------------------
Hey guys, sorry but I forgot to ask you, could someone tell me how to go back to the main page by pressing a single key if your on another page?

ex. Please press r to go back to the main page!!

then you gota press r and it will go to the main page!


Thanks! :D

-----------------------------------
cool dude
Tue Jan 25, 2005 6:25 pm


-----------------------------------
i'm not sure wat u r asking but if i know then just press the home button under where it says compsci.ca at the top of the page.

-----------------------------------
countergary
Tue Jan 25, 2005 6:40 pm


-----------------------------------
Wut I meant was, When I open my program and I open a page, how do I go back to the mane page in my program. 

ex "press r to go back to main page" then if you press r in goes back!


btw thanks for helping me with the tutorial :D

-----------------------------------
Bacchus
Tue Jan 25, 2005 7:32 pm


-----------------------------------
[code]var chars :array char of boolean

Input.KetDown(chars)
if chars ('r') then
    %goto main bit here
end if
[code] you can also use getch/get or key down

-----------------------------------
cycro1234
Tue Jan 25, 2005 7:35 pm


-----------------------------------
Or, you could add a button on the page. That is, create a GUI button full and then make the shortcut ctrl r. And then link the button to the main menu procedure.

-----------------------------------
ste_louis26
Wed Jan 26, 2005 12:07 pm


-----------------------------------
do you have mainMenu in procedures?
it's just 

put "blah blah blah "..
getch (key)
mainMenu   %procedure



if mainMenu is declared after this and you can't call it in a procedure then 

just 

forward proc mainMenu

and 

body procedure mainMenu
[/code]

-----------------------------------
cycro1234
Wed Jan 26, 2005 2:06 pm


-----------------------------------
loop
exit when hasch
end loop
Window.Close (window name here)

-----------------------------------
person
Wed Jan 26, 2005 6:42 pm


-----------------------------------
getch could also work

-----------------------------------
MysticVegeta
Wed Jan 26, 2005 6:50 pm

Re: 1 More thing!
-----------------------------------
Hey guys, sorry but I forgot to ask you, could someone tell me how to go back to the main page by pressing a single key if your on another page?

ex. Please press r to go back to the main page!!

then you gota press r and it will go to the main page!


Thanks! :D
var key : string (1)
forward proc ends

proc main
    cls
    put "The prog starts"
    put "Press any key to exit"
    loop
        exit when hasch
    end loop
    ends
end main

body proc ends
    cls
    put "Press any key to go back to the beginning"
    loop
        getch (key)
        if key = 'r' then
            exit
        end if
    end loop
    main
end ends

main
