Script to 'insert word'

Is it possible to use applescript to 'insert a word' in the same way it might insert the date?
I ask because it's been nagging me day in/day out as to whether or not I can, even marginally use applescript to create a bundle of scripts (perhaps saved as applications or some other 'fast' way to execute them) that would have words instead of actions (though the imputting of the word, would technically be an action).
I was thinking like:
Saying "The" would input the word the, into the text field. I've seen this done with numbers.
Perhaps using some kind of keystroke command? (I know the input numbers was done with key-strokes) Instead of having one script per keystroke (though greatly beneficial for my spelling, terrible for time!) having one script per word, with multiple 'linked' keystrokes to eventually end up with a word?
I seriously don't feel like handing over 100-200 dollars if I can even marginally (or perhaps, efficiently with excessive difficulty in pulling it off) use the original system I have at hand to use a speech to text 'program' (or in this case large number of scripts!).

--Why stop at a word? Run the script below (note that I've escaped contained "'s in the text). (There are more conventional ways to do this.)
tell application "TextEdit"
make new document at front
activate document 1
tell application "System Events"
keystroke "Is it possible to use applescript to 'insert a word' in the same way it might insert the date?
I ask because it's been nagging me day in/day out as to whether or not I can, even marginally use applescript to create a bundle of scripts (perhaps saved as applications or some other 'fast' way to execute them) that would have words instead of actions (though the imputting of the word, would technically be an action).
I was thinking like:
Saying \"The\" would input the word the, into the text field. I've seen this done with numbers.
Perhaps using some kind of keystroke command? (I know the input numbers was done with key-strokes) Instead of having one script per keystroke (though greatly beneficial for my spelling, terrible for time!) having one script per word, with multiple 'linked' keystrokes to eventually end up with a word?
I seriously don't feel like handing over 100-200 dollars if I can even marginally (or perhaps, efficiently with excessive difficulty in pulling it off) use the original system I have at hand to use a speech to text 'program' (or in this case large number of scripts!)."
end tell
end tell
Message was edited by: osimp

Similar Messages

  • Adobe Acrobat 9/Win7 - Inserting Word documents into PDF file intermittently leads to missing or garbled text?

    Heya.
    I have a user who is creating a PDF essentially compiled from inserting word documents into the position she wants inside of the PDF.
    The problem is that sometimes this leads to missing or garbled text. For example, 6-8.1 is displayed as 6- .1. Which is just plain weird.
    Other times, the text looks garbled or uneven. She turned off her PC but I took screenshots of both of these scenarios. I fear that I am not going to be able to retroactively fix the corruption in this document for her.
    She says she's using very standard fonts. Like Arial. I asked if she could locate the original Word document that produced the garbled text, just for a sanity check. The problem is that her co-worker may have been the only one with that particular word document (there are probably hundreds which compile this PDF...) and IF she has it, she might not be able to locate it on her PC TO check what the original text is. Yikes.
    Google-fu turns up very little. I tried the guidance in this document - https://answers.acrobatusers.com/We-combine-PDF-document-ends-corrupt-What-problem-q197619 .aspx[2] and a Save-As but no avail.
    This also turns up but is not applicable to Acrobat 9 I believe:  http://blogs.adobe.com/acrobatineducation/2010/02/get_rid_of_that_bloat_in_your.html[3]
    She states that she can manually fix the document but after a while it gets corrupted again? But I haven't observed that and she might have just fed me that to amplify the problem.
    I will be able to post screenshots when she turns on her computer tomorrow.

    Here are the two instances of corruption we have come across.
    http://imgur.com/nPztMYm
    http://imgur.com/wHM12e2
    Edit:  A LITTLE MORE INFO.  I am able to select the corrupted text, paste it into Notepad with all the characters intact.  So the characters are THERE.  they are just not being displayed correctly.
    Edit:  They also do not print correctly.  The page prints with characters missing, and she wants to print this document, so that is going to be an issue.

  • Flex application works locally, fails when online (connecting to PHP script to insert row into DB)

    Hi everyone,
    I've got a Flex application that works wonderfully when I test it on my machine locally. It uploads files and send variables to a PHP script (that inserts them into a DB) with no errors when I run it locally. As soon as I put it online, the upload continues to work but something between my Flex application and the PHP script fails because no data is committed to the DB. I know the PHP script works fine - not only does it work when I run the Flex application locally but when I go directly to the PHP file online, a new empty line is added to the DB.
    I initially thought that this was a cross domain issue so I added the following to the root of my hosted account:
    <cross-domain-policy>
    <site-control permitted-cross-domain-policies="all"/>
    <allow-access-from domain="*.MYURL"/>
    <allow-http-request-headers-from domain="*.MYURL" headers="*" secure="false"/>
    </cross-domain-policy>
    I based this off of what I found online which seems to have done nothing for me. I'd also be happy to provide an error message but I don't get one when I debug.
    Any thoughts would be greatly appreciated.

    Use a network monitor to see if the Flex app is truly requesting the right URL.
    -Alex

  • Script to insert file name into keywords field of same file

    Hello,
    search a solution, a Script or another, which writes the file name into keywords field of same file (Metadata: Description/Keywords) in "photoshop", "bridge" or better in "Lightroom" .
    I found this topic from Mike Hale http://www.ps-scripts.com/bb/viewtopic.php?t=1330
    It's possible this script to change this in such a way that it does this:
    "script to insert file name into keywords field of same file"
    Thanks and best greetings
    Wolfgang

    This works in CS2:-
    #target bridge
       if( BridgeTalk.appName == "bridge" ) {
    nameDescription = MenuElement.create("command", "AddName to Description", "at the beginning of Thumbnail");
    nameDescription .onSelect = function () {
         nameToDescription();
    function nameToDescription(){
    var items = app.document.selections;
          for (var i = 0; i < items.length; ++i) {
             var item = items[i];   
    var m = item.synchronousMetadata;
    filenameToDesc(m, item.name.slice(0,-4));
    function filenameToDesc(metadata, Description) {
    var strTmpl = "name2Desc";
    var strUser = Folder.userData.absoluteURI;
    var filTmpl = new File(strUser + "/Adobe/XMP/Metadata Templates/" + strTmpl + ".xmp");
    var fResult = false;
    try
    { if (filTmpl.exists)
    filTmpl.remove();
    fResult = filTmpl.open("w");
    if (fResult) {
    filTmpl.writeln("<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"3.1.2-113\">");
    filTmpl.writeln(" <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">");
    filTmpl.writeln(" <rdf:Description rdf:about=\"\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">");
    filTmpl.writeln("<dc:description>");
    filTmpl.writeln("<rdf:Alt>");
    filTmpl.writeln("<rdf:li xml:lang=\"x-default\">"+Description+"</rdf:li>");
    filTmpl.writeln("</rdf:Alt>");
    filTmpl.writeln("</dc:description>");
    filTmpl.writeln(" </rdf:Description>");
    filTmpl.writeln(" </rdf:RDF>");
    filTmpl.writeln("</x:xmpmeta>");
    fResult = filTmpl.close();
    metadata.applyMetadataTemplate(strTmpl, "replace");
    filTmpl.remove();
    catch(e)
    { fResult = false; }
    return fResult;

  • Sample script to insert  into mtl_transactions_interface for sales order

    Hi,
    can any one provide me the script to insert into mtl_transactions_interface for sales order transactions. actually i have to create the transactions for all the assemblies/components of C* item (configured item). as per the standard functionality it will create only for the C* item.
    Thanks in advance..
    Regards,
    Sreenath

    If I understood your question correctly, your requirement is as follows.
    You have a sales order for a configured item - say C*123.
    The components of C*123 are A and B.
    A and B as well as C*123 appear on the sales order.
    When you ship the sales order, Oracle will create sales order issue transaction for C*123.
    You would like to use the transactions interface to create sales order issue transactions for A & B.
    That is wrong thing to do.
    You should not create a sales order issue for A & B.
    You need to BUILD C*123 by creating a work order. You need to perform WIP component issue transaction for A & B.
    Hope this helps,
    Sandeep Gandhi

  • Bash script to insert item in a alphabetical list

    I would like to use a bash script to insert a new "source" file into a list of sources which occurs within another file.
    The file in question is quite long and contains many other things. However the list of sources abides by the format below.
    [snip]
    SOURCES = \
    _add_datasource_.m \
    _add_line_series_.m \
    ylabel.m \
    ylim.m \
    zlabel.m \
    zlim.m
    [snip]
    How might I insert a new source file in alphabetical order. I'm assuming there is a fairly simple script to do such.
    TiA

    #!/usr/bin/env bash
    if [[ $# != 1 ]]; then
    echo 1>&2 "Usage: ${0##*/} fileto_insert_inSOURCE"
    exit 1
    fi
    MAKEFILE=Makefile.in
    TMP=/tmp/tmp.$$
    awk -v new="$1" '
    /^SOURCES =/ { in_src = 1 }
    in_src && ! done && $1 > new {
    # New file goes here
    printf(" %s \
    ", new)
    in_src = 0
    done = 1
    in_src && ! done && ! /\$/ {
    # New file must go after the last entry.
    # Put  on old last entry.
    printf("%s \
    ", $0)
    # replace current $0 with the new file.
    $0 = sprintf(" %s
    ", new)
    done = 1
    ! /\$/ { in_src = 0 } # NOT in SOURCE
    { print } # print current line
    ' $MAKEFILE >$TMP
    mv $TMP $MAKEFILE

  • Script works in Word 2008 but can't assign keyboard shortcut

    Since I must have emacs keystrokes on those fortunately rare occasions when I have to use Word 2008, and because there is no explicit "delete character" command in Word (since there's already a built in keystroke for it, presumably) I've written a simple script that activates the delete key:
    tell application "System Events"
    tell application "Microsoft Word" to activate
    key code 117
    end tell
    I have put this in ~/Documents/Microsoft User Data/Word Script Menu Items so that it shows up in the script menu in Word. If I select the script from the menu via the mouse, it works just fine and deletes the character to the right of the cursor. However, if I try to assign a Word-specific keyboard shortcut (the usual emacs keystroke Ctrl-d, of course) using the Keyboard & Mouse preference pane to this macro it simply doesn't work. "^D" shows up next to the name of the script in the Word script menu, so the shortcut appears to be registering, and the little script menubar icon even flashes blue when I hit Ctrl-d, but nothing happens; the script just does not seem to run.
    Any help appreciated. I really need to have this keystroke to be able to use Word and remain reasonably happy about it.
    -TXLogic

    Follow up: My Word-specific shortcut seems to work the *first time* I use it after bringing up a document. Thereafter it fails. Thanks.
    -TXLogic

  • Download SAP Script as MS word format

    Can we download SAP Script in MS word format? If so Please suggest me the way.

    I'm not very sure on how it can be achieved, but this can help you.
    Spool to word -> http://sap4.com/codigofuente/102/396.html

  • Bash script - sqllite insert problem

    So, I'm making a bash script that inserts a config file into a database, but I can't get it to work.
    This is my best attempt so far:
    name="bashrc"
    location="/home/user/.bashrc"
    content=`cat "$location"`
    sqlite3 testdb "insert into dbase values ('`echo $name`','`echo "$location"`','`echo "$content"`')"
    the table is
    create table dbase(name text, location text, data text)
    I had a hard time trying to figure out how I'd be able to get $variables to work (because of the quotes) and this echo style seems to work, but there seems to be no way to insert the config file into the database.
    plaintext files seem to work no problem, but when I'm trying to insert some config file, it spits out errors. (It seems like it's trying to execute the file somehow?)
    Last edited by initbox (2009-08-29 15:28:49)

    initbox wrote:I was thinking the single quotes were stopping bash from replacing $variables with the content, hence the echoes.
    your single quotes are inside a double quote, so to bash they're just another character in the string.
    I'm still getting an SQL syntax error, so bash is no longer getting in the way, but this thing is a true nightmare. What next? This turned out to be way harder than I expected, I'm just doing this as a "fun" learning experiment.
    Your error is probably because I was escaping the quotes for bash, and I should have been escaping them for sqlite. In sqlite, escaping a quote is done by doubling it, so ' is escaped to '' (that's two apostrephes side by side, not a double quote. Compare '' and ").
    This untested sed command might work:
    content = $(cat $location | sed "s/\'/\'\'/g")
    The \'s are escaping the quote from bash, what its really doing is replacing ' with ''.
    Dusty

  • Insert word count

    Is there a way to insert word count? I have some professors that want a word count and I wanted to know if there was an "insert word count" somewhere?

    No, there isn't. Can't you write it by hand?
    Remember that Pages counts different to how MS Word does.
    _http://discussions.apple.com/thread.jspa?messageID=10937776_
    And read this thread _http://discussions.apple.com/thread.jspa?messageID=10877817_

  • I am enrolled in an online university program that uses Sakai. Fire Fox updated something that attaches computer script to my Word documents when I upload them.

    I am enrolled in an online university program that uses Sakai. Fire Fox updated something that attaches computer script to my Word documents when I upload them. I use a PC and Word 2010

    sigh...this is quite idiotic, but I have found a solution. It was quite simple, really, and yet quite idiotic. I share it for all those reading so that, if you know of anyone else that did what i did, you can easily be the "hero" in their lives.
    After a continued search via youtube or what have you for any possible solutions, I kept coming back to the fact that I was told by my computer that I didn't have "permission" to do the file deletion. I stumbled upon a youtube video that talked about "unlocking", "locking", certain files and what not.
    Long story short, the reason why I couldn't do anything to the files that were on my desktop was due to my "locking" the desktop folder. I must have done this a while back not knowing what I was doing nor the ramifications of clicking a simple box.
    I undid this by:
    Opening Up Finder
    then, going to MacHD --> Users --> My Account Folder
    clicking on Desktop Folder, I "cmd+I"
    I then, unclicked the "locked" option
    I went down to the cog/settings and selected "Apply to enclosed items"
    resulting then in having all my files on my desktop free accessiblity and delete-ability....
    oi...at least I now  know what "locking" a folder (even the desktop folder) can do to other files held within it

  • Creating the Script to insert the table.

    Hi Team
    I have object type like
    emp_obj(
    empno number,
    empname varchar2(22)
    Refer to the Table Type
    TYPE EmpTabTyp IS TABLE OF emp_obj
    By using this below SP who to pepare the script to insert into the emp table.
    create or replace procedure spi_emp(
    in_emp emptabtype)
    as
    begin
    for i in in_emp.first..in_emp.last
    loop
    insert into emp (empno,empno) values(in_emp.emp_obj.empno(i),in_emp.emp_obj.empname(i));
    end loop;
    end;

    Your question is rather vague, but I guess you want something like this:
    declare
        l_nt EmpTabTyp;
    begin
        l_nt.extend(3);
        l_nt(1) := emp_obj(1111, 'MR KNOX');
        l_nt(2) := emp_obj(2222, 'FOX IN SOCKS');
        l_nt(3) := emp_obj(3333, 'THE LORAX');
        spi_emp(l_ent);
    end;
    /Cheers, APC

  • Script to find word stacks in InDesign

    CS6, InDesign -- I've been looking for a proofing script that finds word & letter stacks and highlights items found & would be easily removed once items have been reconciled.

    While this scripting forum is a great place to get scripting help, it's also very easy to misuse it. Please bear in mind that for most (if not all) of the participants here, writing scripts is a source of income. If someone writes a particularly useful script, don't be shy to offer money (privately)! Also, please do not expect that complete scripts will be written for you (although in many cases they will be). If you are a novice scripter and show an interest in learning, you will generally find that the help you recieve will be much more positive.
    Here's a short list of "Dos" and "Don'ts" to keep in mind...
    Do ask for help in automating your work in InDesign, but Don't expect a full solution for free.
    Do show an interest in learning, and people will probably try to help you, butDon't ask for other people to solve all your problems for you.
    If you need a script written for you, Do ask if someone is available to write one for pay, but Don't keep such an issue on the forum. Work it out off the forum please.
    Please Do thank others who spend the  time to solve your issues, and pleaseDon't expect every issue to be solved on a public forum. Many solutions have  taken a lot of programming time to work out, and it's not reasonable to  expect such solutions to be given away for free.
    Please Do give code examples to help other people, but please Don't pass off others code as you own!
    Please Do make a note in the topic of a new thread of what language you are using as well as the version number that you are using such as: [JS][CS3].
    Please Don't branch off a discussion in the middle to a new topic -- please start a new one!
    Please Don't start two discussions on one topic -- it makes it very confusing!

  • The type tool has a circle with a strike through on the bottom corner and won't insert words when iI type

    I've just restored from a computer crash and re installed Creative Cloud 6 on my clean computer.  Since then I've tried to use illustrator but can't get the type tool to function.  It appears but has a small circle with a strike through on the bottom right corner and won't insert words when I type.  I'm a newbie to illustrator and other Adobe products so please be gentle.  Thanks for any help.

    Thanks for your suggestion. 
    This was a bigger problem than I thought so I contacted support. The type issue was fixed in the repair.
    BTW I am running Creative Cloud 2014 and not cc6 like I thought.  Also on PC Windows 7
    Here is the result:
    I also have had a difficult time with Adobe Illustrator CC 2014 crashing upon launch.  The support staff was great even though we had to work through several sessions.  Below is the email explaining our final session.
    This email is in regards with the issue you had been facing with Illustrator CC 2014.
    While going through the installer logs, we found that there was an issue with the installation & the program installer had been denied access to several critical files & folders during installation.
    This was the main reason for Illustrator crash as several critical components had not been installed properly.
    We tried installing the program in a new user account & that worked.
    Though the program has been installed properly now & is working in your old account, I will still strongly recommend you to get your computer user account repaired with a Windows 7 operating system diskette.
    This is required so that you do not run into more trouble later while working with the Adobe Applications or even while installing other programs.
    Avanish Divya was the final support person that successfully resolved my problems.
    I hope this helps other panicked users. 

  • Can we download SAP Script to a word document  ?

    Is it possible to download the SAP Script to a local Word documnet . and then is it possible to upload the Wrd Doc back to SAP SCript with a new Script name ..?

    Hi
    Hope it will help you.
    <REMOVED BY MODERATOR>
    want to Insert SAP ICONS into from SAP into Word document (OLE) .
    (1) Copy program DD_ADD_PICTURE into your own version called ZDD_ADD_PICTURE. Make sure
    you select all the checkboxes (including GUI Status and screens).
    (2) Paste the modified code at the end of this reply into your ZZ_ADD_PICTURE program.
    (3) Run ZZ_ADD_PICTURE for a range of Icons (e.g. enter Icon name ICON_IN* on the selection screen)
    (4) When you get the result list, type in ok-code EXPO directly in the ok-code
    field (you could also add a button for this function in the GUI status).
    (5) Download all the displayed icons as .gif files into a Windows folder
    that you have created to hold the icon .gif files (e.g. C:SAPICONS)
    (6) Now you can work with the icon files as you would any .gif file. (e.g. In a Word doc, use menu path
    Insert -> Picture -> From file.)
    Here is the code:
    REPORT dd_add_picture.
    TYPE-POOLS: sdydo.
    DATA: do TYPE REF TO cl_dd_document.
    DATA: is_displayed.
    TABLES: icont.
    DATA: BEGIN OF icontab OCCURS 0.
            INCLUDE STRUCTURE icon.
    DATA: END OF icontab.
    select-options: s_icon for icontab-name obligatory.
    SELECT * FROM icon INTO TABLE icontab WHERE locked NE 'X'
                        AND name in s_icon.
    Event Handler Definition, handling changes of GUI fonts, colors,...
    CLASS cl_my_event_handler DEFINITION.
      PUBLIC SECTION.
        METHODS:
          use_new_resources FOR EVENT resources_changed OF cl_gui_resources.
    ENDCLASS.
    DATA: my_handler TYPE REF TO cl_my_event_handler.
    CREATE OBJECT my_handler.
    Call Screen
    CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
    MODULE status_0100 OUTPUT.
      IF is_displayed IS INITIAL.
        SET PF-STATUS 'BRP'.
        SET HANDLER my_handler->use_new_resources.
    create document
        CREATE OBJECT do.
    fill document
        PERFORM dd_add_icon USING do.
    merge document
        CALL METHOD do->merge_document.
    display document .
        CALL METHOD do->display_document
                           EXPORTING  container          = 'HTML'
                           EXCEPTIONS html_display_error = 1.
                                           " do some exception handling ...
        is_displayed = 'X'.
      ENDIF.
    ENDMODULE.                             " STATUS_0100  OUTPUT
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK'.                       "Beenden
          LEAVE PROGRAM.
        WHEN 'PRN'.
          CALL METHOD do->print_document
                  EXPORTING reuse_control = 'X'.
        WHEN 'PRN_NEW'.
          DATA text TYPE sdydo_text_element.
          CALL METHOD do->initialize_document.
          text = 'Dies Dokument wurde speziell fürs Drucken erstellt!' &
                            ' Druckdatum: '(500).
          CALL METHOD do->add_text EXPORTING
                               text         = text
                               sap_fontsize = cl_dd_area=>large.
          WRITE sy-datum TO text DD/MM/YYYY.
          CALL METHOD do->add_text EXPORTING text = text .
          CALL METHOD do->new_line EXPORTING repeat = 2.
          PERFORM dd_add_icon USING do.
          CALL METHOD do->merge_document.
          CALL METHOD do->print_document.
        WHEN 'EXPO'.
          CALL METHOD do->export_document EXPORTING to_filesystem = 'X'.
      ENDCASE.
      CLEAR sy-ucomm.
    ENDMODULE.                             " USER_COMMAND_0100  INPUT
    *&      Form  DD_ADD_ICON
          text
    FORM dd_add_icon USING p_do TYPE REF TO cl_dd_document.
      DATA ta TYPE REF TO cl_dd_table_element.
      DATA col1 TYPE REF TO cl_dd_area.
      DATA col2 TYPE REF TO cl_dd_area.
      DATA col3 TYPE REF TO cl_dd_area.
      DATA text TYPE sdydo_text_element.
    set Heading
      text = ' Bilder in Dynamischen Dokumenten'(001).
      CALL METHOD p_do->add_text EXPORTING text = text
                                      sap_style = 'heading'.
      CALL METHOD p_do->new_line.
      CALL METHOD p_do->new_line.
      CALL METHOD p_do->add_table EXPORTING with_heading    = 'X'
                                          no_of_columns     = 3
                                          width             = '100%'
                                          IMPORTING table   = ta.
    set columns
      text = 'Ikone'(011).
      CALL METHOD ta->add_column EXPORTING heading  = text
                                 IMPORTING column   = col1.
    fill table
      LOOP AT icontab.
        SELECT SINGLE * FROM icont WHERE langu = sy-langu
                                   AND   id    = icontab-id.
        CALL METHOD col1->add_icon EXPORTING sap_icon = icontab-name
                                             sap_color = 'LIST_GROUP'.
      ENDLOOP.
    ENDFORM.                               " DD_ADD_ICON
    CLASS cl_my_event_handler IMPLEMENTATION.
    CLASS cl_my_event_handler IMPLEMENTATION.
      METHOD use_new_resources.
        IF is_displayed EQ 'X'.
    initialize document
          CALL METHOD do->initialize_document.
    fill document
          PERFORM dd_add_icon USING do.
    merge document
          CALL METHOD do->merge_document.
    display document
          CALL METHOD do->display_document
                              EXPORTING reuse_control        = 'X'
                                        reuse_registration   = 'X'.
        ENDIF.
      ENDMETHOD.
    ENDCLASS.
    Edited by: Alvaro Tejada Galindo on Feb 18, 2008 6:22 PM

Maybe you are looking for

  • Screen sharing only works for some computers

    I have 3 computers on the same network.  For this thread I will refer to them as C1, C2 & C3.  All computers show in the sidebar as shared and I can look at all the files within these computers. C1 and C2 can see C3 with screen sharing but no other c

  • Details of GR/IV tables

    Hi All, I want to know from which table(s) I can get the details (about all entries) of documents for which G/R is completed and IV has not completed or vice versa along with quantity, value & dates. Do suggest. Regards,

  • Report on users having a single function

    Hi, I would like to know what is the best practice to get an analysis on all users having a function (not a SoD)?  Do I need to create a risk type 'critical action' for each function ? Thanks Bill

  • Could we run PL/SQL using JACL?

    Hi, Could we run the PL/SQL code using JCAL script or any other way doing it? I am aware about executing SQL queries using JACL script. thanks, Sumant

  • Can you change the apple id of a downloaded app?

    My wife opened a new apple id to download me am app for my birthday, can i register/ switch that app to our shared apple id?