key_press

new topic     » goto parent     » topic index » view thread      » older message » newer message

------=_NextPart_000_0004_01BDED69.A72041E0
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

hiya
still having trouble with the key press
here is the complete program
with warning

with type_check

-- Includes --

include get.e

include graphics.e

include mouse.e

mouse_events(LEFT_DOWN + LEFT_UP + RIGHT_DOWN)=20




--------------

procedure main_menu()

-- main menu --

clear_screen()

text_color(4)

bk_color(8)

puts(1 =
=CD=CD=CD=CD=CD=BB" )

puts(1 ,"=BA The Magnificent Menu =BA" )

puts(1 =
=CD=CD=CD=CD=CD=B9" )

puts(1 ,"=BA Press............ =BA Press............ =CC THIS =B9" )=20

puts(1 ,"=BA =BA =CC IS =B9" )

puts(1 ,"=BA =BA =CC MaGnIfIcEnT =B9" )

puts(1 ,"=BA =BA Q.to quit =
=CC=CD=CD=CD=CD=CD=CD=CD=CD=CD=CD=CD=CD=CD=CD=CD=CD=CD=CD=CD=B9" )

puts(1 ,"=BA =BA =CC =B9" )

puts(1 ,"=BA =BA =CC =B9" )

puts(1 ,"=BA =
=CD=CD=CD=CD=CD=CD=CD=CD=CD=CD=CD=CD=CD=CD=CD=B9" )

puts(1 ,"=BA =BA MY FIRST PROGRAM" )

puts(1 ,"=BA =BA =BA" )

puts(1 ,"=BA =BA A programmable menu system for DOS, =BA" )

puts(1 ,"=BA =BA =BA" )

puts(1 ,"=BA =BA =BA" )

puts(1 ,"=BA =BA =BA" )

puts(1 ,"=BA =BA =BA" )

puts(1 ,"=BA =BA =BA" )

puts(1 ,"=BA =BA =BA" )

puts(1 ,"=BA =BA =BA" )

puts(1 ,"=BA =BA =BA" )

puts(1 ,"=BA =BA Report any bugs and misspelled words =BA" )

puts(1 ,"=BA =BA to my E-mail address..MRSMOO at ES.CO.NZ=BA" )

puts(1 =
=CD=CD=CD=CD=CD=BC" )


end procedure

-------------

procedure descriptions()

-- Key descriptions --=20

position(6,4)

puts(1, "1. CONSTANT")

position(8,4)

puts(1, "2. GAMES ONE PLAYER")

position(10,4)

puts(1, "3. UTILITIES")

position(12,4)

puts(1, "4.PARK HEADS")

position(14,4)

puts(1, "5.Description for key 5")

position(16,4)

puts(1, "6.Description for key 6")

position(18,4)

puts(1, "7.Description for key 7")

position(20,4)

puts(1, "8.Description for key 8")

position(22,4)

puts(1, "9.Description for key 9")

cursor(UNDERLINE_CURSOR)

end procedure

-------------


procedure main_control()

-- Main control --

-- Only 1 - 9 --

-------------------------------------------------------------------------=
------


-------------------------------------------------------------------------=
------=20

atom keypress=20

keypress =3D wait_key()

if keypress =3D '1' then

system("ex C:\\EUPHORIA\\constant.ex",0)=20

elsif keypress =3D '2' then

system("",0) system("",0) system("",0)

elsif keypress =3D '3' then

system("",0) system("",0) system("",0)

elsif keypress =3D '4' then

system("",0) system("",0) system("",0)

elsif keypress =3D '5' then

system("",0) system("",0) system("",0)

elsif keypress =3D '6' then

system("",0) system("",0) system("",0)

elsif keypress =3D '7' then

system("",0) system("",0) system("",0)

elsif keypress =3D '8' then

system("",0) system("",0) system("",0)

elsif keypress =3D '9' then

system("",0) system("",0) system("",0)

elsif keypress =3D 'q' or keypress =3D 'Q' then

--clear_screen()

--cursor(UNDERLINE_CURSOR)

if graphics_mode(-1) then

end if

abort(1)

end if=20


main_menu()

descriptions()

main_control()

end procedure

-------------

main_menu()

descriptions()

main_control()

IF YOU GO UP TO ATOM KEY_PRESS you will see the dos command i have been =
using.when i hit 1 the constant .ex program flashes on screen then just =
goes away

any ideas?????????????/

thanx brent






------=_NextPart_000_0004_01BDED69.A72041E0
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>hiya</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>still having trouble with the key=20
press</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>here is the complete =
program</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2><FONT size=3D2>
<P>with warning</P>
<P>with type_check</P>
<P>-- Includes --</P>
<P>include get.e</P>
<P>include graphics.e</P>
<P>include mouse.e</P>
<P>mouse_events(LEFT_DOWN + LEFT_UP + RIGHT_DOWN) </P>
<P></P>
<P>&nbsp;</P>
<P>--------------</P>
<P>procedure main_menu()</P>
<P>-- main menu --</P>
<P>clear_screen()</P>
<P>text_color(4)</P>
<P>bk_color(8)</P>
<P>puts(1=20
)</P>
<P>puts(1 ,&quot;&ordm; The Magnificent Menu &ordm;&quot; )</P>
<P>puts(1=20
)</P>
<P>puts(1 ,&quot;&ordm; Press............ &ordm; Press............ =
&Igrave; THIS=20
&sup1;&quot; ) </P>
<P>puts(1 ,&quot;&ordm; &ordm; &Igrave; IS &sup1;&quot; )</P>
<P>puts(1 ,&quot;&ordm; &ordm; &Igrave; MaGnIfIcEnT &sup1;&quot; )</P>
<P>puts(1 ,&quot;&ordm; &ordm; Q.to quit=20
acute;&Iacute;&sup1;&quot;=20
)</P>
<P>puts(1 ,&quot;&ordm; &ordm; &Igrave; &sup1;&quot; )</P>
<P>puts(1 ,&quot;&ordm; &ordm; &Igrave; &sup1;&quot; )</P>
<P>puts(1 ,&quot;&ordm;=20
te;&Iacute;&Iacute;&Iacute;&sup1;&quot;=20
)</P>
<P>puts(1 ,&quot;&ordm; &ordm; MY FIRST PROGRAM&quot; )</P>
<P>puts(1 ,&quot;&ordm; &ordm; &ordm;&quot; )</P>
<P>puts(1 ,&quot;&ordm; &ordm; A programmable menu system for DOS, =
&ordm;&quot;=20
)</P>
<P>puts(1 ,&quot;&ordm; &ordm; &ordm;&quot; )</P>
<P>puts(1 ,&quot;&ordm; &ordm; &ordm;&quot; )</P>
<P>puts(1 ,&quot;&ordm; &ordm; &ordm;&quot; )</P>
<P>puts(1 ,&quot;&ordm; &ordm; &ordm;&quot; )</P>
<P>puts(1 ,&quot;&ordm; &ordm; &ordm;&quot; )</P>
<P>puts(1 ,&quot;&ordm; &ordm; &ordm;&quot; )</P>
<P>puts(1 ,&quot;&ordm; &ordm; &ordm;&quot; )</P>
<P>puts(1 ,&quot;&ordm; &ordm; &ordm;&quot; )</P>
<P>puts(1 ,&quot;&ordm; &ordm; Report any bugs and misspelled words =
&ordm;&quot;=20
)</P>
<P>puts(1 ,&quot;&ordm; &ordm; to my E-mail <A=20
m;&quot;=20
)</P>
<P>puts(1=20
)</P>
<P></P>
<P>end procedure</P>
<P>-------------</P>
<P>procedure descriptions()</P>
<P>-- Key descriptions -- </P>
<P>position(6,4)</P>
<P>puts(1, &quot;1. CONSTANT&quot;)</P>
<P>position(8,4)</P>
<P>puts(1, &quot;2. GAMES ONE PLAYER&quot;)</P>
<P>position(10,4)</P>
<P>puts(1, &quot;3. UTILITIES&quot;)</P>
<P>position(12,4)</P>
<P>puts(1, &quot;4.PARK HEADS&quot;)</P>
<P>position(14,4)</P>
<P>puts(1, &quot;5.Description for key 5&quot;)</P>
<P>position(16,4)</P>
<P>puts(1, &quot;6.Description for key 6&quot;)</P>
<P>position(18,4)</P>
<P>puts(1, &quot;7.Description for key 7&quot;)</P>
<P>position(20,4)</P>
<P>puts(1, &quot;8.Description for key 8&quot;)</P>
<P>position(22,4)</P>
<P>puts(1, &quot;9.Description for key 9&quot;)</P>
<P>cursor(UNDERLINE_CURSOR)</P>
<P>end procedure</P>
<P>-------------</P>
<P></P>
<P>procedure main_control()</P>
<P>-- Main control --</P>
<P>-- Only 1 - 9 --</P>
<P>----------------------------------------------------------------------=
---------</P>
<P></P>
<P>----------------------------------------------------------------------=
---------=20
</P>
<P>atom keypress </P>
<P>keypress =3D wait_key()</P>
<P>if keypress =3D '1' then</P>
<P>system(&quot;ex C:\\EUPHORIA\\constant.ex&quot;,0) </P>
<P>elsif keypress =3D '2' then</P>
<P>system(&quot;&quot;,0) system(&quot;&quot;,0) =
system(&quot;&quot;,0)</P>
<P>elsif keypress =3D '3' then</P>
<P>system(&quot;&quot;,0) system(&quot;&quot;,0) =
system(&quot;&quot;,0)</P>
<P>elsif keypress =3D '4' then</P>
<P>system(&quot;&quot;,0) system(&quot;&quot;,0) =
system(&quot;&quot;,0)</P>
<P>elsif keypress =3D '5' then</P>
<P>system(&quot;&quot;,0) system(&quot;&quot;,0) =
system(&quot;&quot;,0)</P>
<P>elsif keypress =3D '6' then</P>
<P>system(&quot;&quot;,0) system(&quot;&quot;,0) =
system(&quot;&quot;,0)</P>
<P>elsif keypress =3D '7' then</P>
<P>system(&quot;&quot;,0) system(&quot;&quot;,0) =
system(&quot;&quot;,0)</P>
<P>elsif keypress =3D '8' then</P>
<P>system(&quot;&quot;,0) system(&quot;&quot;,0) =
system(&quot;&quot;,0)</P>
<P>elsif keypress =3D '9' then</P>
<P>system(&quot;&quot;,0) system(&quot;&quot;,0) =
system(&quot;&quot;,0)</P>
<P>elsif keypress =3D 'q' or keypress =3D 'Q' then</P>
<P>--clear_screen()</P>
<P>--cursor(UNDERLINE_CURSOR)</P>
<P>if graphics_mode(-1) then</P>
<P>end if</P>
<P>abort(1)</P>
<P>end if </P>
<P></P>
<P>main_menu()</P>
<P>descriptions()</P>
<P>main_control()</P>
<P>end procedure</P>
<P>-------------</P>
<P>main_menu()</P>
<P>descriptions()</P>
<P>main_control()</P>
<P>IF YOU GO UP TO ATOM KEY_PRESS you will see the dos command i have =
been=20
using.when i hit 1 the constant .ex program flashes on screen then just =
goes=20
away</P>
<P>any ideas?????????????/</P>
<P>thanx brent</P>
<P>&nbsp;</P>

------=_NextPart_000_0004_01BDED69.A72041E0--

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu