Indigo Rose Software
  #1  
Old 09-26-2003
Desmond's Avatar
Desmond Desmond is offline
Indigo Rose Staff Member
 
Join Date: Jul 2003
Posts: 628
Grin Responding to Key Presses

Responding to Key Presses

Responding to Key Presses

Document ID: IR10019
The information in this article applies to:
  • AutoPlay Media Studio 5.0 Professional Edition

SUMMARY

This article describes how to make your application respond to key presses.

DISCUSSION

In AutoPlay Media Studio 5.0, there is an event called On Key. This event is launched whenever a key is pressed. This is useful if you want your application to, for example, play a sound every time the user presses a key.

Another use for this event is to do something only when a specific key is pressed. As an example, consider Internet Explorer. A user types in a URL into the address bar, and when they press enter, the page they requested is loaded.

To accomplish this example in AutoPlay Media Studio 5.0:

Create an input object. In it's On Key event, input the following code:

--e_Key is a built in variable. 13 is the ASCII value for [Enter]

if e_Key == 13 then

--Loads the text input by the user

Web.LoadURL("Web1", Input.GetText("Input1"));

end

Please note that this script assumes that you have an input object named "Input1" and a web object named "Web1".

This script reads every key pressed by the user while in the input box. When [enter] is pressed, the script loads the URL.

MORE INFORMATION

For more information please see the following topics in the AutoPlay Media Studio 5.0 help file:

  • Program Reference | Action Editor | Events | On Key

KEYWORDS: AutoPlay Media Studio 5.0, Events, Key, Press


Last reviewed: September 26, 2003
Copyright © 2003 Indigo Rose Corporation. All rights reserved.
__________________
Setup Factory 8.0 comes with over 250 actions so you can create smaller, faster and more intelligent software installers than ever before.

WebHelp Guides: AMS | MSIFACT | SUF | TU | VP
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On



All times are GMT -6. The time now is 02:51 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software