PDA

View Full Version : Howto Responding to Key Presses


Adam
11-22-2007, 01:15 PM
Question:
Can AutoPlay Media Studio react to a key pressed on the users keyboard?

Answer:
You can make your application react to keystrokes using the following instructions:

1) Go to Page -> Properties -> Script -> "On Key" of the page that you would like to put this functionality.
2) Find out what the ASCII code of the key that you wish to capture is. There is a full list available from Here .
3) For our example we will capture the space bar. So from looking at the table in step 2 I can see that the Decimal value is 32.
4) Now add the following code:
if e_Key == 32 then
-- Your code that reacts to this keystroke goes here
end

Bruce
10-19-2008, 03:19 PM
"There is a full list available from Here"
Where?

yosik
10-19-2008, 06:22 PM
Help File.
Search for ASCII.
Yossi