Record a word, with KeyboardEvent.KEY_DOWN

Hello, I was wondering what a best practice is to capte a word.
For example if someone types in 'hello' then a function should be initialized.
Should i push every letter that is pressed in an Array? and check on every keydown if the word is in the array?
Or is it better to use a string and add a letter to this string en look in it to see if there is a match?
regards,
Chris.

Build a string and compare it to a string.   You may want to try using KEY_UP rather than KEY_DOWN.

Similar Messages

  • Find/Change words (with GREP) and apply a style...

    I need a Script for Find/Change words with GREP, and apply a paragraph style...
    Thanks...

    Hi Marcos,
    If you want the script to create character styles: Bold , Italic, Bold Italic, etc, and replace local formatting with these styles, use scripts in post #3.
    But if you want find and change words, or/and replace local formatting with styles defined by you, use FindChangeByList script.
    If the latter, I recommend you to download and install Record Find Change script (written by Martin Fisher).
    Then choose settings you need in Find-Change dialog – make sure they work as expected – and run Record Find Change script. A Notepad/TextEdit file will pop up with a line containing the recorded setting. Copy it, open FindChangeList.txt, delete the contents of this file and paste the line you just copied (or add it to the bottom of the file).
    Repeat the process for all find-change operations you need.
    Finally run FindChangeByList.jsx to make all changes in one go.
    However, while using Record Find Change script, you may encounter a problem: it doesn’t record paragraph and character styles placed inside a group. But you can write references to such styles like so:
    appliedParagraphStyle:app.activeDocument.paragraphStyleGroups.item("Style Group 1"). paragraphStyles.item("Paragraph Style 1")
    Kasyan

  • OLE-Word with table

    Hi,
    i use OLE-Word to create a table in a word document and fill them.
    That's work OK, but i will position the table on a specific Positon on the page.
    Position shell be horizontal 7 and vertical 8.
    I have tried it with recording in word, bot i don't know the statements in ABAP.
    Has anyone an idea to solve it or an example?
    thanks.
    Regards, Dieter.
    Edited by: Dieter Gröhn on Jun 16, 2008 10:34 AM

    Here my code:
    REPORT ZGRO_MS_WORD_OLE_FORMLETTER_T0.
    *--Include for OLE-enabling definitions
    INCLUDE OLE2INCL .
    *--Global variables
    *--Variables to hold OLE object and entity handles
    DATA GS_WORD        TYPE OLE2_OBJECT . "OLE object handle
    DATA GS_DOCUMENT    TYPE OLE2_OBJECT . "Documents
    DATA GS_ACTIV_DOC   TYPE OLE2_OBJECT . "Active document
    DATA GS_APPLICATION TYPE OLE2_OBJECT . "Application
    DATA GS_OPTIONS     TYPE OLE2_OBJECT . "Application options
    DATA GS_ACTWIN      TYPE OLE2_OBJECT . "Active window
    DATA GS_ACTPAN      TYPE OLE2_OBJECT . "Active pane
    DATA GS_VIEW        TYPE OLE2_OBJECT . "View
    DATA GS_SELECTION   TYPE OLE2_OBJECT . "Selection
    DATA GS_FONT        TYPE OLE2_OBJECT . "Font
    DATA GS_PARFORMAT   TYPE OLE2_OBJECT . "Paragraph format
    DATA GS_TABLES      TYPE OLE2_OBJECT . "Tables
    DATA GS_RANGE       TYPE OLE2_OBJECT . "Range handle for various ranges
    DATA GS_TABLE       TYPE OLE2_OBJECT . "One table
    DATA GS_BORDER      TYPE OLE2_OBJECT . "Table border
    DATA GS_CELL        TYPE OLE2_OBJECT . "One cell of a table
    DATA GS_PARAGRAPH   TYPE OLE2_OBJECT . "Paragraph
    START-OF-SELECTION .
      PERFORM WORD_APPLIKATION.
      PERFORM TABELLE_ERSTELLEN.
      PERFORM TABELLE_ZELLE.
      FREE OBJECT GS_WORD .
    FORM WORD_APPLIKATION.
    *--Creating OLE object handle variable
      CREATE OBJECT GS_WORD 'WORD.APPLICATION' .
      IF SY-SUBRC NE 0 .
        MESSAGE S000(SU) WITH 'Error while creating OLE object!'.
        LEAVE PROGRAM .
      ENDIF .
    *--Setting object's visibility property
      SET PROPERTY OF GS_WORD 'Visible' = '1' .
    *--Opening a new document
      GET PROPERTY OF GS_WORD 'Documents' = GS_DOCUMENT.
      CALL METHOD OF GS_DOCUMENT 'Add' .
    *--Getting active document handle
      GET PROPERTY OF GS_WORD 'ActiveDocument' = GS_ACTIV_DOC .
    *--Getting applications handle
      GET PROPERTY OF GS_ACTIV_DOC 'Application' = GS_APPLICATION .
    *--Setting the measurement unit
      GET PROPERTY OF GS_APPLICATION 'Options' = GS_OPTIONS .
      SET PROPERTY OF GS_OPTIONS 'MeasurementUnit' = '1' . "CM
    *--Getting handle for the selection which is here the character at the
    *--cursor position
      GET PROPERTY OF GS_APPLICATION 'Selection' = GS_SELECTION .
      GET PROPERTY OF GS_SELECTION 'Font' = GS_FONT .
      GET PROPERTY OF GS_SELECTION 'ParagraphFormat' = GS_PARFORMAT .
    ENDFORM.                    "word_applikation
    FORM TABELLE_ERSTELLEN.
    *--Getting entity handles for the entities on the way
      GET PROPERTY OF GS_ACTIV_DOC 'Tables' = GS_TABLES .
      GET PROPERTY OF GS_SELECTION 'Range' = GS_RANGE .
    *--Adding a table
      CALL METHOD OF GS_TABLES 'Add' = GS_TABLE
           EXPORTING #1 = GS_RANGE
                     #2 = '1' "Number of rows
                     #3 = '1'. "Number of columns
    *--Setting border attribute
      GET PROPERTY OF GS_TABLE 'Borders' = GS_BORDER .
      SET PROPERTY OF GS_BORDER 'Enable' = '0' .                "0 o. 1
    DATA GS_ROWS   TYPE OLE2_OBJECT.
      GET PROPERTY OF GS_TABLE 'Rows' = GS_ROWS.
      SET PROPERTY OF GS_ROWS  'WrapAroundText' = '1'.
      SET PROPERTY OF GS_ROWS  'HorizontalPosition' = '3'.
      SET PROPERTY OF GS_ROWS  'RelativeHorizontalPosition' = '1'.
      SET PROPERTY OF GS_ROWS  'VerticalPosition' = '8'.
      SET PROPERTY OF GS_ROWS  'RelativeVerticalPosition' = '1'.
      set property of GS_ROWS  'AllowOverlap'     = '0'.
    ENDFORM.                    "Tabelle_erstellen
    FORM TABELLE_ZELLE.
    *--Getting cell coordinates
      CALL METHOD OF GS_TABLE 'Cell' = GS_CELL
        EXPORTING #1 = '1'
        #2 = '1'.
    *--Getting the range handle to write the text
      GET PROPERTY OF GS_CELL 'Range' = GS_RANGE .
    *--Filling the cell
      SET PROPERTY OF GS_RANGE 'Text' = 'Test' .
    ENDFORM.                    "TABELLE_Zelle
    in Word i record and get this:
    Sub Makro1()
    ' Makro1 Makro
    ' Makro aufgezeichnet am 16.06.2008
        ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=1, NumColumns:= _
            1, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
            wdAutoFitFixed
        With Selection.Tables(1)
            If .Style <> "Tabellengitternetz" Then
                .Style = "Tabellengitternetz"
            End If
            .ApplyStyleHeadingRows = True
            .ApplyStyleLastRow = True
            .ApplyStyleFirstColumn = True
            .ApplyStyleLastColumn = True
        End With
        With Selection.Tables(1).Rows
            .WrapAroundText = True
            .HorizontalPosition = CentimetersToPoints(2)
            .RelativeHorizontalPosition = wdRelativeHorizontalPositionPage
            .DistanceLeft = CentimetersToPoints(0.25)
            .DistanceRight = CentimetersToPoints(0.25)
            .VerticalPosition = CentimetersToPoints(8)
            .RelativeVerticalPosition = wdRelativeVerticalPositionPage
            .DistanceTop = CentimetersToPoints(0)
            .DistanceBottom = CentimetersToPoints(0)
            .AllowOverlap = False
        End With
    End Sub
    i will translate it in abap. how can i do it.
    i tried something in FORM TABELLE_ERSTELLEN but i can see the table, but i don't get the right position.
    Any idea?
    thanks.
    Regards, Dieter

  • Compare word by word  with stopword list

    I write my program to read file text and separate the word by word. Now I want compare the word with stopword list. Please help me how to I compare the word with stopword list...please help me..thanks...
    import java.io.*;
    import java.util.*;
    import java.util.StringTokenizer;
    class token {
    int flag = 0;
    public static void main (String args[])
         token baca = new token();
         baca.readFile();
    } // end main
    void readFile()
         String record = null;
    try {
              FileReader fr = new FileReader("farrago.txt");
              FileWriter out = new FileWriter("test1.txt");
              BufferedReader br = new BufferedReader(fr);
              BufferedWriter br1 = new BufferedWriter(out);
              record = new String();
         while ((record = br.readLine()) != null)
              StringTokenizer stTok = new StringTokenizer(record," ");
              while (stTok.hasMoreTokens())
                   //System.out.println(stTok.nextToken());
                   br1.write(" " + stTok.nextToken());
                   br1.newLine();
         } // END WHILE
         br.close();
    br1.close();
         } catch (IOException e)
         // catch possible io errors from readLine()
         System.out.println("IOException error: ");
         e.printStackTrace();
    } // end of readMyFile()
    } // end of class

    okay, thanks..now i add all stopwordlist in hash table,see my code..
    Now how I want to COMPARE this stopwordlist in hashtable with my text file.
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    public class MySword {
    public static void main (String args[])
         Hashtable ht;
    String s;
         ht = new Hashtable();
         try {
         BufferedReader in = new BufferedReader(new FileReader("stopwordEnglish.txt"));
         while ((s = in.readLine()) != null)
              ht.put(new Integer(s.hashCode()), s);
         catch(IOException e)
              System.err.println("IO ERROR: " + e.getMessage());
         System.out.println("words:"+ ht);
    }

  • Advice for recording spoken word directly into FCP?

    I want to teach some kids to record spoken word directly into FCP with most likely a USB mic. I know that this is not the best way to do this, and a mixer would help greatly. With that said, can anyone provide any suggestions for getting the best quality out of a basic mic and a Mac with FCP?
    Thanks.

    I'm with David on this. My sweet spot for peaks is in the -6 to -3 range as well. I'm talking about ideal for "recording" your VO, not necessarily for delivering a final mix to the client as already mentioned.
    When you record anything through a microphone, there will be a noise floor to contend with. Even the quietest recording studios with the best isolation and the quietest mic preamps have noise and hum at some level. So it's critical for us without ideal recording environments to keep our recording levels as hot as possible without clipping in order to achieve the best signal-to-noise ratio. If you record something too low, and bring it up in post, you will be bringing up the noise floor along with the signal.
    Eddie

  • Unable to record internal audio with RecordMyDesktop

    In order to record sound and video from my desktop, I installed RecordMyDesktop (https://wiki.archlinux.org/index.php/RecordMyDesktop) and followed the instructions from post #4 and #6 on a thread about "Recording internal audio with alsa and recordmydesktop" (https://bbs.archlinux.org/viewtopic.php … 3#p1359593). When I try to record with "recordmydesktop --device looprec", it will not start recording and closes with the following error:
    Initial recording window is set to:
    X:0 Y:0 Width:1920 Height:1080
    Adjusted recording window is set to:
    X:0 Y:4 Width:1920 Height:1072
    Your window manager appears to be i3
    Initializing...
    Buffer size adjusted to 4096 from 4096 frames.
    Opened PCM device looprec
    Couldn't set format.
    Error while opening/configuring soundcard looprec
    Try running with the --no-sound or specify a correct device.
    If this information would be helpful, I use alsamixer and "aplay -l" gives the following:
    **** List of PLAYBACK Hardware Devices ****
    card 0: PCH [HDA Intel PCH], device 0: ALC663 Analog [ALC663 Analog]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 0: PCH [HDA Intel PCH], device 1: ALC663 Digital [ALC663 Digital]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
    Subdevices: 7/8
    Subdevice #0: subdevice #0
    Subdevice #1: subdevice #1
    Subdevice #2: subdevice #2
    Subdevice #3: subdevice #3
    Subdevice #4: subdevice #4
    Subdevice #5: subdevice #5
    Subdevice #6: subdevice #6
    Subdevice #7: subdevice #7
    card 1: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
    Subdevices: 8/8
    Subdevice #0: subdevice #0
    Subdevice #1: subdevice #1
    Subdevice #2: subdevice #2
    Subdevice #3: subdevice #3
    Subdevice #4: subdevice #4
    Subdevice #5: subdevice #5
    Subdevice #6: subdevice #6
    Subdevice #7: subdevice #7
    I can record from the microphone with with the command "recordmydesktop". I succeeded in recording the internal audio with audacity by choosing the device "looprec" for recordings. I'm not sure why RecordMyDesktop gives an error while Audacity does not. Below is my ~/.asoundrc, which I copied from the aforementioned thread. I am not knowledgeable, but I guess there is a mistake in it? Would you please assist me solving this error? Thank you for your time.
    pcm.!default {
    type asym
    playback.pcm "LoopAndReal"
    #capture.pcm "looprec"
    capture.pcm "hw:0,0"
    pcm.looprec {
    type hw
    card "Loopback"
    device 1
    subdevice 0
    pcm.LoopAndReal {
    type plug
    slave.pcm mdev
    route_policy "duplicate"
    pcm.mdev {
    type multi
    slaves.a.pcm pcm.MixReale
    slaves.a.channels 2
    slaves.b.pcm pcm.MixLoopback
    slaves.b.channels 2
    bindings.0.slave a
    bindings.0.channel 0
    bindings.1.slave a
    bindings.1.channel 1
    bindings.2.slave b
    bindings.2.channel 0
    bindings.3.slave b
    bindings.3.channel 1
    pcm.MixReale {
    type dmix
    ipc_key 1024
    slave {
    pcm "hw:0,0"
    rate 48000
    #rate 44100
    periods 128
    period_time 0
    period_size 1024 # must be power of 2
    buffer_size 8192
    pcm.MixLoopback {
    type dmix
    ipc_key 1025
    slave {
    pcm "hw:Loopback,0,0"
    rate 48000
    #rate 44100
    periods 128
    period_time 0
    period_size 1024 # must be power of 2
    buffer_size 8192
    Last edited by rayanamukami (2014-07-05 14:05:20)

    You might want to take a look here and here.

  • I can record voice memos fine using the built-in iPhone 4 mic.  And my Bluetooth headset (Jawbone Era) works fine when I leave messages on voice mail systems etc. when calling on the iPhone 4.  However, I cannot record voice memos with my Bluetooth mic.

    I can record voice memos fine using the built-in iPhone 4 mic.  And my Bluetooth headset (Jawbone Era) works fine when I leave messages on voice mail systems etc. when calling on the iPhone 4, so it appears my headset mic is fine.  I can also use voice activated dialing, although it fails miserably interpreting numbers.  However, I cannot record voice memos with my Bluetooth mic.   I just get barely audible static.  Any suggestions?   Thanks.

    Hello, did you ever get an answer to your question? I just picked up a Jawbone Era and using on an iPhone 4s running 5.0.1. Seems to work fine on regular calls, but not on the built in Voice memos application. It worked fine on my older Jawbone Icon, but haven't tested on the 4s or iOS 5.
    Thanks!

  • I have Words with Friends app on iphone and game on computer.  When I try to play with Facebook friends message says" Account Already Connected.  This Facebook account has been connected to another user."  How can I play game on iphone or my pc?

    I have Words with Friends app on my iphone4S and the same game on computer.  When I try to play Words with Friends with Facebook on the iphone the  message says" Account Already Connected.  This Facebook account has been connected to another user."  It is connected to my computer. How can I play game on iphone?

    Hi Grandmaz5,
    If you are having issues connecting to Facebook on your iPad, and you have already troubleshot the Facebook app itself, you may want to check the built-in iOS settings for Facebook; you may find the following article helpful:
    iOS: Using Facebook, Twitter, and other social network accounts
    http://support.apple.com/kb/HT5500
    Regards,
    - Brenden

  • I am trying to download words with friends app and it says it is no longer available from itunes.  I had already downloaded it and did a update in my I phone 4 and it is still not letting me download it?

    I am trying to download words with friends and itunes is saying it is no longer available for purchase.  What is going on??I

    First you need to research all the problems people are having with the higher OSX versions, & make sure you have a bootable clone of what you have just in case.
    then you must get 10.6 if they still have it, install it & update to 10.6.8 so you have the App Store to buy & download the huge 10.8 Installer.
    Snow Leopard/10.6.x Requirements...
    General requirements
       * Mac computer with an Intel processor
        * 1GB of memory (I say 4GB at least, more if you can afford it)
        * 5GB of available disk space (I say 30GB at least)
        * DVD drive for installation
        * Some features require a compatible Internet service provider; fees may apply.
        * Some features require Apple’s MobileMe service; fees and terms apply.
    Which apps work with Mac OS X 10.6?...
    http://snowleopard.wikidot.com/
    It's been pulled from the online store & Apple Stores, so you have to call Apple to buy it, last I heard.
    Call Apple Sales...in the US: 1-800-MY-APPLE. Or Support... 1-800-275-2273
    Other countries...
    http://support.apple.com/kb/HE57

  • I am trying to use Words with friends on my iphone 5.  How do I get rid of   "Connect to itunes to Use Push Notifications

    I am trying to use Words with friends on my iphone 5.  How do I get rid of   "Connect to itunes to Use Push Notifications

    Reading some older threads from 2012 and 2011 it appears the problem was present even then.  Part of the problem was due to people using multiple or different account id's on the various devices.  In my case, I only have one ID and it is the same on all devices yet the iPhone and iPad are still throwing the same error when I try turning on iTunes Match.  This is very frustrating . . . any help out there?  Thanks.

  • I am getting a "invalid screenshot" when trying to upload the screen shot to a Words With Friends cheat app.  It just started doing this!

    I am getting a "invalid screenshot" when trying to upload the screenshot to a Words With Friends cheat application.
    What am I doing wrong?

    That was no help!  When playing with two grown daughters with high IQs,
    I need all the help I can get!

  • Firefox stops responding when I try to play words with friends, eventually a box pops up about script

    First, let me say I have the latest version of Firefox and Adobe Flash Player and Java Script. When I click to play Words With Friends (on pc) my computer starts racing and sounds loud and every thing freezes. If I try to click on slider or anything else, it says Mozilla Firefox (not responding), then it takes several minutes and a box pops up that says something about a script, do I want to continue or ?(I can't remember), after I click continue, I can play the game, but, at any given time Firefox will stop responding again!! A box also pops up from AVG saying that Firefox is using too much memory. Just an aside, I can play Scrabble on Facebook without any problems whatsoever. Please help, it is driving me crazy. Thanks

    Sounds that you are missing the plugin that is used to play those videos embedded in Firefox.<br />
    Your system details list doesn't show any media player plugin, so you will either have to check if the plugin(s) are installed, but disabled or install missing plugins.
    *https://support.mozilla.org/kb/Popular+plugins
    You may need the new WMP plugin (np-mswmp.dll) because Flash always uses a dedicated player to play the videos and would never offer to save videos directly unless an extension is used.
    * https://support.mozilla.org/kb/Using+the+Windows+Media+Player+plugin+with+Firefox
    * http://kb.mozillazine.org/Windows_Media_Player#Missing_plugin

  • I don't know how to go back to the original look of my Dashboard. I don't know what I did, but now when I click on it, my Words with Friends game comes up and that is all. How do I "reset" it to the original things on it?

    I don't know how to go back to the original look of my Dashboard. I don't know what I did, but now when I click on it, my Words with Friends game comes up and that is all. How do I "reset" it to the original things on it?

    Firefox 4 requires at least OS X 10.5 and an Intel Mac.
    * http://www.mozilla.com/firefox/4.0/system-requirements/
    You can look at:
    * http://www.floodgap.com/software/tenfourfox/
    Firefox 3.6.x can be found here:
    * http://www.mozilla.com/en-US/firefox/all-older.html

  • Question about "words with friends" rules-can more than 1 person play on the same Ipod device?

    I have a Ipod touch 5th Generation and I like to play the free game version of "Words with Friends"  Can other family members in my house sign up to play on my Ipod using a different user name?  I have tried to figure this part out and there's no clue available on the "Words with Friends" website.  Thanks for your help again!!!  I also have music on my computer that I would like to transfer to the new Ipod.  How do I do that?  I haven't been able to link it to "Itunes" yet, and then sync it to my Ipod. 

    Well, E3000 doesn't support any usb port replicator. So, in case if you want to use any hard drive you need to connect it directly to the router.

  • I have a new ipod and when I sign in to Words with Friends it says that user name is already in use. How can I continue using the same user name with a different ipod?

    I have a new ipod and added all my apps to it. When I sign in to Words with Friends it says that "user name is already in use" because it is linked to my old ipod. How can I use the same user name with my new ipod?

    Was the iPod setup via iTunes on this computer?
    Setup via wifi?
    Was the iPod previous synced to another iTunes library/computer?
    Have you successfully synced from this iTunes library/computer before?
    Do the songs play in iTunes?           
    Do you have the right boxes checked to sync?
    iTunes: Syncing media content to iOS devices and iPod        
    Try syncing using the manual method                 

Maybe you are looking for

  • Runtime error in Logging Console

    Hi, after upgrading to Portal 6.0 SP2 from Patch 3 to Patch 4 i get an Portal Runtime Error via System Administration -> Monitoring -> Portal -> Logging Console. (com.sap.portal.runtime.admin.logadmin.default) I cannot start this component via the Po

  • Scrolling doesn't work on some applications

    I'm using the program Notepadd++ and I can't use the touchpad to scroll. I've connected a USB mouse, and scrolling works fine with that device. I've tried reinstalling the drivers, etc, and it still has the same problem. Scrolling also doesn't work w

  • Need to stop irrelevant input into inbox / how to do a REAL filter?

    I finally found the User Manual. This should be put up at the head of the website - not hidden away. It was recently posted. I didn't know it existed. I discovered it by accident. Some of the stuff in the User Manual is confusing and not well or comp

  • Cannot download cumulative update for Office 2010 December 2014

    I tried to download the cumulative update for Office 2010 (December 2014) at the following link: https://technet.microsoft.com/library/dn789213(v=office.14) When you click the link (http://support.microsoft.com/kb/KB3020815) you get to an "oops" page

  • Catalogue Freezes in Photoshop Elements 12 in Windows 7 on desktop

    I  am trying to transfer Photoshop Elements 12 Catalogue to a new computer, (from W7 to W8.1) but when backing up my catalogue on W7 I get as far as 62% and Photoshop stops responding. I have repaired and checked the catalogue in Catalogue manager an