Home
Project Folders
Teacher Resources
Student Resources
How Do I?
Literacy
MWForum
Site Map
Search
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] <

To: <mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: keys and procedure
From: "Alain Tougas" <alain@xxxxxxx>
Date: Fri, 9 Feb 2007 13:27:43 -0500

Hi,

Try this:

to test
if key? [make "key readchar runproc]
test
end

to runproc
fd 10
end

Create a button on the page and type TEST as the instruction. You must do
that because READCHAR will only work if you click on the page. If you type
TEST in the Command Center, then the last click is NOT on the page and the
procedure will not work. Type anything you want in the RUNPROC procedure..
You need the instruction MAKE "KEY READCHAR because when there is a key
pressed, MW has to "eat" it otherwise the primitive KEY? will always report
TRUE. Once the key has been read (or eaten), KEY? returns FALSE.

Alain
  -----Original Message-----
  From: mwforum-admin@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
[mailto:mwforum-admin@xxxxxxxxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Burke,
Bridget -CKJH
  Sent: January 9, 2007 12:16 PM
  To: mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
  Subject: [MWForum] keys and procedure


  A student would like to know if there is a way to  hold down a key to keep
a procedure  running and when the key is released the procedure stops.


  • Previous by thread: keys and procedure

  • To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.


    © copyright 2001 - 2008