Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2002
    Location
    Melbourne, Australia
    Posts
    19

    Mapping characters to keycodes question

    Hello SF7 forum.

    As part of a setup, I include a screen to accept a character from the user, with 'Z' as the default character.
    Once obtained, I would like to assign a Keyboard shortcut to a particular program, with the Keyboard shortcut comprising of 'CTRL+ALT+?' where '?' is the character obtained from the user (or 'Z' as default).

    My quesion is, how do I convert my character obtained into a keycode, as required in Shell.CreateShortcut?

    As an example, to create a Keyboard shortcut of 'CTRL+ALT+Z', I would use the following command:

    DTFolder = SessionVar.Expand("%DesktopFolder%");
    Shell.CreateShortcut(DTFolder, "TP", SessionVar.Expand("%AppFolder%\\TP.exe"), "", "", "", 0, SW_SHOWNORMAL, {ctrl=true,alt=true,keycode=90}, "");

    However, I'm not sure how to build 'keycode=90' from the character 'Z' typed in an editbox.

    Any suggestions would be greatly appreciated.

    Regards,
    Casman.

  2. #2
    Join Date
    May 2000
    Location
    Indigo Rose Software
    Posts
    2,150
    What does the letter 'Z' return when you print it to a Dialog.Message()?

    Adam Kapilik

  3. #3
    Join Date
    Sep 2004
    Posts
    60
    casman,

    Take a look at String.Asc in the help file, it will do what you are looking for.

  4. #4
    Join Date
    Jun 2002
    Location
    Melbourne, Australia
    Posts
    19
    Thanks for the responses.

    I tried the String.Asc and it has worked a treat!.

    Thankyou for your assistance.

    Regards,
    Casman.

Similar Threads

  1. DOS commands
    By John_Klassek in forum AutoPlay Media Studio 5.0
    Replies: 4
    Last Post: 09-16-2004, 08:48 AM
  2. Function: Get the Valid Numeric Characters for the Current Locale
    By Lorne in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 06-09-2004, 10:15 AM
  3. question about sound mp3
    By Rapido78840 in forum AutoPlay Media Studio 4.0
    Replies: 4
    Last Post: 10-10-2003, 11:19 AM
  4. typed characters in edit field stay into the field
    By ovm in forum AutoPlay Media Studio 4.0
    Replies: 6
    Last Post: 09-01-2003, 11:13 PM
  5. How do I restrict certain characters in an edit field
    By tomarppe in forum Setup Factory 6.0
    Replies: 7
    Last Post: 02-13-2002, 09:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts