Highlight and speak a line of text

I am trying to create a single key shortcut to highlight a line of text, or sentence in Word then have the computer speak it. My brother is non-verbal and has limited control over his body. He uses a large keyboard device to speak, but would rather use his mac laptop. He can't manipulate the mouse very well, and can only hit one key at a time. So there are a lot of constraints. I would like to create a shortcut so that once he types out a sentence he can then hit a single key and it will speak the sentence out loud. I have figured out some small parts of this, but nothing that ties it all together. It looks like Applescript might be my only hope, but I can't write script for crap. Any help or tips would be greatly appreciated.

Here's a script that I just wrote real quick that may or may not work exactly as you need...
<pre style="width:630px;height:auto;overflow-x:auto;overflow-y:hidden;"
title="Copy this code and paste it into your Script Editor application.">property bQuit : "Quit"
property bIdle : "Idle"
property bSpeak : "Speak"
global what2Say
on run
set what2Say to "I have something to say..."
speakit()
end run
on reopen
speakit()
end reopen
on speakit()
repeat
display dialog "Enter text to be spoken:" default answer what2Say buttons ¬
{bQuit, bIdle, bSpeak} default button 3 giving up after 99999999
set {bChoice, what2Say, gaveUp} to ¬
{button returned of result, text returned of result, gave up of result}
if bChoice is bSpeak then
say what2Say
else if bChoice is bIdle or gaveUp then
exit repeat
else if bChoice is bQuit then
quit
return
end if
end repeat
end speakit
on quit
continue quit
end quit</pre>
Save the above script as an Application and make sure it's set to "Stay Open". Once saved, when the script is launched it will display a dialog that you can type something into. You have 3 button choices. If you click "Speak" (this button can be clicked by simply pressing the return key) it will say what was typed in the text box and then display another dialog to type in. If you click "Idle" the script will stay launched, but wait until you click on its icon in the Dock before displaying another dialog. If you click "Quit", well... the script will quit.
You can also design a super simple Automator Service that will do almost the same exact thing, but I can't figure out how to assign only one key to make it active (2 keys is simple, but you say he's limited to just 1).
Hope this helps or at least gives you some other options!

Similar Messages

  • Find and edit specific line in text file?

    Hello I want to read a text file that could look in some different ways since the user choose file from a list. I then want to igonre all the lines that begin with a special character, for example %. I then want to find all the lines "words" that begin with TRY for example and put those "words" in a string or array. If there is one line that contains TRY100 and anoter line that contains TRY200 I want to find those words and display them. How do i do this?

    First you read the entire file.  Use the Read Text File.  Right-click on it and select the option to Read Lines.  The the count to read to -1 (read all).  You will now have an array of strings, one item for each line of your file.
    Now you need to play the filter game.  I recommend using FOR loops with Autoindexing tunnels.  Assuming you are using 2012 or later, have the output autoindexing tunnels use the conditional tunnel.
    Give this a try and see where you can go.  Post back with what you have tried and tell us where you are stuck.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Can you cut and paste multiple lines of text in adobe forms?

    Hi -
    I am working on cutting and pasting large amounts of information into adobe forms. When I presently cut and paste from Excel, it puts all of the data in one line rather than in separate choices in a multiple choice selection.
    Is there a way to separate out this data so that from the excel sheet, each piece of data is separated into a different possible selection?
    Thanks,
    Laura M

    That's not the way of transferring data from Excel to a PDF form. You should format the data in two rows, the first being the field names and the second being their values, and then import it via Tools - Forms - More Form Options - Import Data...

  • Report for Vendor line item with GL line item text

    Hello SDN,
    We need to add the GL Line item text to a vendor line item report. I don't think adding a GL field is available option in the FBL1N report. Is there a way to display the Vendor name, Vendor number, Open amount and the GL line item text in a report without ABAP invovlement?
    I would really appreciate your help. Thank you.
    Edited by: nsap_fico on Aug 10, 2011 6:29 PM

    Some alternative is in KSB1 (Cost center line item report) - you can change the layout and include offsetting account and its text.
    But, in vendor line item report, if you want vendor number, vendor number, GL account number (offsetting) account and its text, then you should go with abap development.
    Have a look at the following note, if really serves your purpose.
    Note 1504612 - Line items: Offsetting account info (BAdI FI_ITEMS_CH_DATA)

  • Line item text in ALV..urgent

    hello
       i m creating an alv interactive report. in basic list i have fields from likp table and in interactive i have lips table fields. one need one more field in interactive list and that is "line item text" field. (i have matnr and arktx in interactive). for the time being i created line item text in VL02>>ITEM>>TEXTS>> FOR ITEM NUMBER(POSNR). I didnt understand where this line item text is stored ; i mean in which table it is stored . how to retreive this field from a table??

    Hi,
    You have to use the FM READ_TEXT..to get the text name..
    The following are the details you have to pass to the FM..
    Text name - Delivery number + line item.
    Language - SY-LANGU
    Text ID - ????
    Text Object - VBBP.
    You can get the above details in the text itself..
    Display the text..
    Double click on the text to get to the editor..
    In the menu..choose..GOTO -> HEADER..
    There you can see the details like Text ID, text name & text object..And use them in the FM read_text..
    Thanks
    Naren

  • How to Make a line of text smile?

    Is it possible to type on a path in Motion, so I can then animate the path and make a line of text look like it is smiling? Or any advice as how I can go about this?
    Thanks

    I have not watched the tutorial, but was going to post that I used a 3 point bezier open line shape that I keyframed into a smile, used that as the shape in a "Geometry" layout and it worked fine...
    It was a bit slow to render, but not too bad. Sorry I didn't keep it to post online...
    Patrick

  • How do I restore previous bookmarks, highlights, and notes?

    I closed my session using digital editions and when I reopened it, all of my notes, highlights, and bookmarks disappeared from the text book I was reading. So many hours of work unaccounted for... how do I get it all back?! On a mac.

    To restore from backup see:
    iOS: How to back up     
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        

  • Converted single line text to multiple and want to have rich text editing in layout

    We had a text field in a site that was initially set as single line of text. We needed it to be bigger and also allow formatting. So I added the field into the page layout.
    Changing
    <SharePointWebControls:TextField id="habitat" FieldName="Habitat" runat="server"/>
    to
    <SharePointWebControls:NoteField id="habitat" FieldName="Habitat" runat="server"/>
    But it doesn't show any rich text editing options and displays the full html tags in the field.
    If I open the page in the edit properties screen instead, then the field displays as I want it with the rich text editing options available in the ribbon, and text showing as bolded instead of like this:
    <div>This is <strong>the </strong>habitat field.</div>
    This is a site using the 2010 Publishing template running in compatibility mode on a 2013 server.
    How can I get my page layout to behave the same way as the edit properties screen does?

    Hi,
    Here are two solutions for your reference:
    1. We can use the InputFormTextBox control to achieve it.
    <SharePoint:InputFormTextBox ID="habitat" RichText="true" RichTextMode="FullHtml" runat="server" TextMode="MultiLine" Rows="20"></SharePoint:InputFormTextBox>
    http://blog.qumsieh.ca/2009/01/13/how-to-add-a-rich-text-editor-to-your-custom-application-pages-or-web-parts/
    http://blog.mastykarz.nl/rich-text-editor-control-sharepoint-2010/
    2. We can use the RichHtmlField control to achieve it.
    <PublishingWebControls:RichHtmlField id="habitat" FieldName="Habitat" runat="server"/>
    http://msdn.microsoft.com/en-us/library/office/ms561507(v=office.14).aspx
    Best Regards
    Dennis Guo
    TechNet Community Support

  • How do I split each page into a PDF and name them after a line of text on the split page?

    All,
    I am running a report that is creating hundreds of letters to be sent to customers.  When I run the report it creates one large PDF (one letter = one page).  To help with a specific business solution I need to split each page into an individual PDF.  I know I can extract the pages using the extraction tool.  I have also been able to duplicate this from the Javascript console, but only with generic names.  The problem is that I need each PDF named after the customer's account number.  The account number is listed on the page that I am extracting, but I am having a hard time parsining the text on the pages to find it.
    I need to be able to turn each page into a seperate PDF and then rename that PDF to match the account number list on the page.
    The account number, is of course, different for every customer and has varied prefixes.  The line of text that I need to read starts like this:
    Account Number#: NJA00001
    I need to just pull the NJA00001.
    I would really love to automate this process.
    Can you help me with this?  Thanks in advance.
    PS: I am a little rusty on my Javascript, its been a couple years.

    This can probably be achieved with a custom-made script, but it's not possible to know for sure before seeing some sample files.

  • I have created a email in Fireworks and wanted to make a line of text a hyperlink that would take the viewer to a page on my website. I want to attach the final document to my email and sending it out.

    I have created a email in Fireworks and wanted to make a line of text a hyperlink that would take the viewer to a page on my website. I want to attach the final document to my email and sending it out.

    1) design for no wider than 600px (otherwise it may not fit in email clients).
    2) Slice up your newsletter design in segments for images and html areas with the slice tool.
    3) add the <a href="http://www.yourwebsite.com">my website</a> link in one of the html areas.
    4) export as generic html 4 code, and put the images in a separate folder.
    5) upload all the images to your website's server in a folder (you cannot embed images in an email newsletter - they must link to externally hosted images).
    6) change all the links in your html page to the ones that were loaded up on your server. For example, an image's source link would work out similar to this: <img src="http://www.yourwebsite.com/newsletter/image1.jpg" alt="alternate description of your image">
    7) open the newsletter with working external images in Chrome or Firefox. Select the entire page content (ctrl-a), and copy it (ctrl-c).
    8) create a new email in your mail client. Place the cursor in the body. Paste the newsletter (ctrl-v).
    9) send your newsletter to hundreds of recipients, and get blacklisted by several email servers. Receive warning messages from your own hosting provider not to spam other users' email accounts.
    10) realize this is too much of a hassle, and instead opt for a service such as MailChimp.
    (The result in (9) depends on whether you sent out your newletter only to acquaintances, or not. But even then you might be warned off.)
    Btw, many email clients turn off images in an email by default. You must provide the most important content as html, not as images.

  • JSF - Read a text file and diplay lines of text data on the web page

    Hello,
    For one of my projects, I need to display lines of text data on the web page using Java Server Faces Technology. The raw data could be from simple text files or sockets or anything. (Getting the data is not my issue but displaying is). Could anybody send answers with sample code. In servlet, one could do this by -
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException{
    PrintWriter out = response.getWriter();
    out.println("<html>");
    out.println(DATA);
    out.println(DATA);
    out.println("</html>");
    I am looking for similar solution.
    Thanks in advance
    DK

    Thanks mjolinor.  Works great!
    Two questions.
    1. Could you plz suggest how this could be modified so this code would read the file in or accept it from the pipeline instead of wrapping the (@' around the data?
    2. Could you plz briefly describe some of the details of the code so I can further research and understand.
    Thanks for your help.
    Thanks for your help! SdeDot
    1. It already reads in the file.  The (@' .. '@) bits are just there to create a file using your test data to demonstrate that it works.
    2.  Not user what kind of "details" you want.  There really isn't much there, and get-help on the cmdlets used should provide information on what's going on with them in that script.
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • PO line item text and material po text

    Hi,
    I want to fetch the text maintained at item po level and print the same with form..
    I am passing following parameters in my Include text in smartforms..
    Text name         &VAR6& ..... concatenated po number and item
                            ( 4700000011 + 00010) = 470000001100010
    Text object       EKKO
    Text ID             F01
    Language          EN
    but its failing to fetch the same....I guess the problem is with var6 value...not sure
    also for material po text i m passing
    Text name         &G_ZEKPO-MATNR&  ..
    Text object       MATERIAL
    Text ID           BEST
    Language          EN
    This is also failing.....
    In both cases text is maintained...  what is the problem??
    Pls help..

    See this sample code
    ABAP READ_TEXT functions to read the SAP Long Text
    You have to used the READ_TEXT functions to read the SAP long text. e.g. Sales Order, Purchase Order Item text etc.
    To check your long text header, go into the long text. Click Goto -> Header
    Example of READ_TEXT functions reading tables PBIM - Independent requirements for material.
    REPORT ZTEXT .
    TABLES: PBIM.
    stxh, stxl, stxb - trans tables for text
    ttxit - text on text-ids
    ttxot - Short texts on text objects
    Transaction MD63
    SELECT-OPTIONS: S_MATNR FOR PBIM-MATNR,
                    S_WERKS FOR PBIM-WERKS.
    DATA: BEGIN OF HTEXT.
            INCLUDE STRUCTURE THEAD.
    DATA: END OF HTEXT.
    DATA: BEGIN OF LTEXT OCCURS 50.
            INCLUDE STRUCTURE TLINE.
    DATA: END OF LTEXT.
    DATA: BEGIN OF DTEXT OCCURS 50.
    DATA:   MATNR LIKE PBIM-MATNR.
            INCLUDE STRUCTURE TLINE.
    DATA: END OF DTEXT.
    DATA: TNAME LIKE THEAD-TDNAME.
    SELECT * FROM PBIM WHERE WERKS IN S_WERKS.
      MOVE PBIM-BDZEI TO TNAME.
      CALL FUNCTION <b>'READ_TEXT'</b>
           EXPORTING
              CLIENT                  = SY-MANDT
              ID                      = 'PB'
              LANGUAGE                = 'E'
              NAME                    = TNAME
              OBJECT                  = 'PBPT'
            ARCHIVE_HANDLE          = 0
         IMPORTING
              HEADER                  = HTEXT
         TABLES
              LINES                   = LTEXT
         EXCEPTIONS
              ID                      = 1
              LANGUAGE                = 2
              NAME                    = 3
              NOT_FOUND               = 4
              OBJECT                  = 5
              REFERENCE_CHECK         = 6
              WRONG_ACCESS_TO_ARCHIVE = 7
              OTHERS                  = 8.
      LOOP AT LTEXT.
        IF LTEXT-TDLINE NE ''.
          MOVE LTEXT-TDLINE TO DTEXT-TDLINE.
          MOVE PBIM-MATNR TO DTEXT-MATNR.
          APPEND DTEXT.
        ENDIF.
      ENDLOOP.
    ENDSELECT.
    LOOP AT DTEXT.
      WRITE:/ DTEXT-MATNR, DTEXT-TDLINE.
    ENDLOOP.
    http://www.sapdevelopment.co.uk/sapscript/sapscript_texts.htm
    Also
    *Internal table to store standard texts
    DATA: IT_TEXTS like T_LINE occurs o with header line.
    CALL FUNCTION 'READ_TEXT'
         EXPORTING
            CLIENT                  = SY-MANDT
              id                      =       "Text ID
              language                =       "Laguage
              name                    =       "Text name
              object                  =       "text object
            ARCHIVE_HANDLE          = 0
       IMPORTING
            HEADER                  =
         tables
              lines                   = IT_TEXTS   "Internal table
       EXCEPTIONS
            ID                      = 1
            LANGUAGE                = 2
            NAME                    = 3
            NOT_FOUND               = 4
            OBJECT                  = 5
            REFERENCE_CHECK         = 6
            WRONG_ACCESS_TO_ARCHIVE = 7
            OTHERS                  = 8
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • Newsletter layout, aligning columns, paragraph breaks and lines of text

    HI,
    I have never designed a newsletter before.
    It is annoying me because I am trying to be as meticulous as possible with my alignment, but I notice there are things all over the place that don't line up.
    I have a paragraph style, with space before and after. I have three columns. When I look at one line of text across all three columns, they do not line up. The WOULD line up if I had all straight text and no image wraps, but the image wraps, and the start of a new paragraph in column two, throws off alignment in column three.
    What is the best way to make stuff line up with the least amount of effort possible?
    Are there tutorials on good newsletter layout design? Grid layout?
    Thanks,
    Stan

    I just stated working with InDesign in my GA 101 class. It really was great fun but takes alot of practice. Still learning something new everyday. I  will be working with grids the next class and will be checking in the forum for help.
    Rhonda

  • Find and replace a line in a text  file

    Hi All,
    I wanted to read a text file , find a line and replace that line with out affecting any other lines and with out creating a new file.
    If any one of you know any API to do this work ,please throw some light

    This seems to be a question on optimal implementation of search and replace.
    For replacing text in the file itself, the sought text and replaced text must be the same length,
    as inserting a character somewhere in a file, is better done in a new file.
    You could do this with a java.io.RandomAccessFile[b].
    The new IO package [b]java.nio provides a memory mapped file which is faster.
    The following code does such patching.
    import java.io.*;
    import java.nio.*;
    import java.nio.channels.*;
    public class Patch {
        private static byte[] sought;
         private static byte[] replacement;
         private static boolean matches(MappedByteBuffer bb, int pos) {
              for (int j = 0; j < sought.length; ++j)
                   if (sought[j] != bb.get(pos + j))
                        return false;
              return true;
         private static void replace(MappedByteBuffer bb, int pos) {
              for (int j = 0; j < sought.length; ++j)
                   byte b = (j < replacement.length)? replacement[j] : (byte)' ';
                   bb.put(pos + j, b);
         private static void searchAndReplace(MappedByteBuffer bb, int sz) {
              int replacementsCount = 0;
              for (int pos = 0; pos <= sz - sought.length; ++pos)
                   if (matches(bb, pos)) {
                        replace(bb, pos);
                        pos += sought.length - 1;
                        ++replacementsCount;
              System.out.println("" + replacementsCount + " replacements done.");
        // Search for occurrences of the input pattern in the given file
        private static void patch(File f) throws IOException {
              // Open the file and then get a channel from the stream
              RandomAccessFile raf = new RandomAccessFile(f, "rw"); // "rws", "rwd"
              FileChannel fc = raf.getChannel();
              // Get the file's size and then map it into memory
              int sz = (int)fc.size();
              MappedByteBuffer bb = fc.map(FileChannel.MapMode.READ_WRITE, 0, sz);
              searchAndReplace(bb, sz);
              bb.force(); // Write back to file, like "flush()"
              // Close the channel and the stream
              raf.close();
        public static void main(String[] args) {
              if (args.length == 0)
                   args = new String[] { "row ", "item", "2.xml" };
              if (args.length < 3) {
                   System.err.println("Usage: java Patch sought replacement file...");
                   return;
              sought = args[0].getBytes();
              replacement = args[1].getBytes();
              if (sought.length != replacement.length) {
                   // Better build-in some support for padding with blanks.
                   System.err.println("Usage: sought (" + args[0] + ") and replacement (" + args[1] + ") must have same length");
                   return;
              for (int i = 2; i < args.length; i++) {
                   File f = new File(args);
                   try {
                        patch(f);
                   } catch (IOException x) {
                        System.err.println(f + ": " + x);

  • TS1702 In pages, when I get to the end of a line, the text refuses to start again in the left, it continues on the right and goes down the page, anyone know a solution?

    In pages, when I get to the end of a line, the text refuses to start again in the left, it continues on the right and goes down the page, anyone know a solution?

    Does this occur in all of your Pages documents? Are you certain that you haven't formatted the type to run flush right? (Align right I mean - sorry old typographer lingo). Look at the ruler at the top and check the Align setting.
    Have you tried quitting Pages completely and the restart the iPad?
    Go to the home screen first by tapping the home button. Double tap the home button and the task bar will appear with all of your recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Restart the iPad.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.

Maybe you are looking for

  • Write to measurement file at every n iterations

    Hi guys, I would like some help with saving data in labview 2010 SP1 (base development system). I am using a "Write to measurement fil express VI" inside a while loop and the data out from the DAQmn Read is wired to the signal in of the "Write to mea

  • Crystal Reports 2010 SP1 on IIS 7.0 - Report is not being displayed

    Hi, Finally, the keycode assembly, BusinessObjects.Licensing.KeycodeDecoder.dll error is gone, after I installed Crystal Runtime 2010 SP1. Also, I tested Crystal Report 2010 SP1 on my Windows 32 application and I can tell that I do not have this erro

  • How can I get Adobe Photo 3.2 from my old computer to new computer?

    My old HP computer came with the Adobe Photo 3.2 which worked beautifully for me.  I could upload all my photos, click on the ones I want to put in various collections and send all the photos in that collection in a slide show, which allowed me to se

  • PLEASE HELP WITH SAPSCRIPTS!

    Hello everyone! I really need a lot of help 'cause i'm completly new on programming sapscript, so I don't know where and how to edit a sapscript, for example in program that extracts information before it is send to the script, how am I supposed to d

  • Re: Infinity installation: Engineer appointments b...

    just to let you all know i too orderd bt infinty 2 got a appointment for 24th april 2013 and to be in from 8am to 1pm well i stayed in all day no one called or phoned to explain whats happening or why the delay etc,  the same time come 1pm my phone l