Creating and/or editing a TextEdit document invisibly

I have a script in which the text of a result is set to a new TextEdit document, but that text needs editing prior to displaying the document. As in the following example, I can do the editing invisibly, but creating the initial new document results in the new (blank) TextEdit window flashing on the screen briefly. Anybody think of a different (or modified) approach where that won't happen?
tell application "TextEdit"
activate
--tell application "Finder" to set visible of process "TextEdit" to false
--(Doesn't work because command precedes new document
make new document
tell application "Finder" to set visible of process "TextEdit" to false
(*This works EXCEPT new document flashes on screen briefly before visible command is invoked. Same behavior using System Events. This is a small issue, but I'd like it to not happen.*)
set text of front document to ¬
"A Aphids in the Asparagus
B Bees in your bonnet
C Cats in the concatanation"
tell the text of the front document
set every character where it is "C" to "D"
delay 2 --delay added to evaluate behavior
set every word where it is "dats" to "dog"
delay 2 --delay added to evaluate behavior
set the color of every character where it is "a" to {54563, 5274, 8493}
tell application "Finder" to set visible of process "TextEdit" to true
end tell
delay 2
display dialog "Close Window Without Saving?" buttons {"okay"}
if button returned of result = "okay" then ¬
close front document saving no
end tell
2.7G5 AND OTHERS   Mac OS X (10.4.5)  

You do not have to use TextEdit to make changes, you make all the editing with AS, then you set text of front document of TextEdit:
on run
set AppleScript's text item delimiters to {""}
set result_text to ¬
"A Aphids in the Asparagus
B Bees in your bonnet
C Cats in the concatanation"
set result_text to my replace(result_text, "C", "D")
set AppleScript's text item delimiters to {""}
set result_text to my replace(result_text, "Dats", "Dog")
set AppleScript's text item delimiters to {""}
tell application "TextEdit"
activate
make new document
set text of front document to result_text
tell the text of the front document
set the color of every character where it is "a" to {54563, 5274, 8493}
end tell
delay 2
display dialog "Close Window Without Saving?" buttons {"okay"}
if button returned of result = "okay" then ¬
close front document saving no
end tell
end run
on replace(_string, _find, _replace)
set AppleScript's text item delimiters to {_find}
set _temp to text items of _string
set AppleScript's text item delimiters to {_replace}
return _temp as string
end replace

Similar Messages

  • How can I see and edit my TextEdit documents saved in my iCloud from my iPhone ?

    Hi guys, here is a tricky one!
    I saw that iCould saves my TextEdit documents on the documents to go section, but I am not able to open and edit them from my iPhone.
    On my Iphone if I go on "Settings > iCloud > Storage & Backup > Manage Storage > TextEdit" I am able to see the file name of my TextEdit without being able to open them.
    Ps. I tried as well with Pages but I am not able to open the TextEdit files.
    Many thanks

    Have you tried using iMovie?

  • How do you highlight text in Pages for iPad? The document I want to create and highlight is a pages document

    I am trying to create a document in Pages for iPad and want to highlight various bits of text but can not find a function in the inspector for this. Can anyone help,please?

    Hi stuartdj,
    I'm not finding a way to highlight text as one can do with iBooks (hold and swipe for black text, background yellow for example).
    One option is to actually color the text itself.
    Select the text, then in Style tools, tap the Font name at the top which shows the Text Options sheet where there is a Color option.  Would changing the font color to Red, Green or Purple accomplish your goals?
    If you do want black text on a colored background (highlighted) it would need to be text in a text box where you can change the fill (background) color.  Style, Style Options, Fill.  But this is not inline text and doesn't flow like just coloring the font itself.
    ivan

  • Why can you create and not edit a form in Forms Central with fields not available in Adobe Pro

    I have developed a form in Adobe pro which I want to use the extra fields that are available in Form Central such as ranking. I can create a form with these extra fields but cannot edit it once saved. Whats the trick?

    Hi;
    This FAQ describes how to further edit your FormsCentral PDF form in Adobe Acrobat: http://forums.adobe.com/docs/DOC-3661
    Thanks,
    Josh

  • Word opened from word addin freezing the dialog which has opened from addin and crashing the parent word document

    I have a office addins which works seamlessly in excel, powerpoint and outlook except in word . We have a option to create a word documents using the templates in a dialog which is opened from addin. And we have an option to set the work area  for
    our webapplication either to use filestorage or sharepoint storage.
    Again the same addin works perfectly with filestorage cache but the same doesn't work with sharepoint storage. the problem is when we create the new documents using the templates it produces the new word document, once it is created and opened, the parent
    word document and the intermediate dialog window should get close but  instead it hangs both of them. when i try to close it explicitly it says word has stopped working.
    Issue is with sharepoint 2010+Sharepoint storage and the same is not working with sharepoint 2013 as well as it by default uses sharepoint storage.
    I have posted in the VSTO forum before but I haven't got the response yet. please help me this is a major and critical issue for us.
    PS: irrespective of OS its not working.
    code to produce a file
    function ProduceFile(strFileUrl) {
       var obj = new ActiveXObject('SharePoint.OpenDocuments.3');
       obj.EditDocument(strFileUrl);

    Hi ShilpaSheshadri, 
    if this is a quite urgent, i may suggest to open a ticket directly, so that we can have a remote session to check this up. http://support.microsoft.com
    i checked some forum such as:
    http://social.msdn.microsoft.com/Forums/vstudio/en-US/e2c801c0-6120-432c-97d5-8d59a43ce7f3/thisaddinstartup-is-not-executed-when-open-ms-word-template-using-vsto-from-sharepoint-2010?forum=vsto
    perhaps you can also try to use other workaround, 
    http://blog.qumsieh.ca/2012/11/05/link-to-a-document-opens-in-read-only-mode/
    to check, please have a check if this issue was also shown in other client machine or other client browser version.
    Regards,
    Aries
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • How can I exchange my pc created documents on Excel, Word, and PowerPoint with my mac and my Pages, Numbers and Keynote created content with my pc?  I need to create and edit between both.

    How can I exchange my pc created documents on Excel, Word, and PowerPoint with my mac and my Pages, Numbers and Keynote created content with my pc?  I need to create and edit and exchange between both types of operating systems.

    Your Windows system will not open any Pages, Numbers or Keynote documents. No applications exist for Windows that can open those formats. You will need to export your documents in Word, Excel and PowerPoint formats, respectively, before you'll be able to view and edit the documents on your Windows system. The iWork documents can natively open Word, Excel and PP documents, though there are limitations on what can be imported (for instance, Numbers does not support all possible Excel functions). Consult the documentation for the relevant iWork application for details on importing and exporting.
    If you are asking how to get the documents from one system to the other, then there are several ways to do that, including file sharing, using an external drive (hard drive, USB flash drive), or emailing the documents to yourself. Which would be best for your situation I can't say without more details about your usage.
    Regarsd.

  • HT4942 After Creating a new document or editing an old document in Pages on my iPad I no longer see the changes in Pages on my iPhone. iCloud services are on with both devices.

    After Creating a new document or editing an old document in Pages on my iPad I no longer see the changes in Pages on my iPhone. iCloud services are on with both devices.

    Just thought I'd add my solution, I decided to go with WebDAV and I think it actually works better than the iTunes way, the steps are pretty much the same but avoiding the iTunes interface just makes things easier and faster.
    I followed this guide but it does have a small mistake in the httpd-dav.conf file, on line 2, where it's WebServer/WebDAV">, it should be <Directory "/Library/WebServer/WebDAV">.
    The tricky part is setting permissions which if wrong will give you errors when connecting with the iPad, I opted to set all to Read&Write since my home network has a hardware firewall. Another convenience was to add an alias to the webdav share on the Desktop.
    I'm still expecting the call from Apple but even if they fix the iTunes I'm sticking with WebDAV, atleast until I see what's new with iOS5 and iCloud this fall which should bring true sync for documents (I'm hoping that they will offer encryption with my own keys, if not, then I'll probably keep using WebDAV).

  • Configuring the file server in KM and access,edit the documents from it

    Hi friends,
      My requirement is to configure the file server where u will have all the structured and unstructured data stored here. So users can share the documents and create, edit ,save the documents from the file server itself.
    In KM what kind of file servers are there apart from the one it supports by default.
    Can anybody pls provide the configuration steps regarding how to configure the file server i KM.
    To configure the file server is webDAV protocol required?
    Points would be assigned for the helpful answer.
    Thanks in advance.
    Regards
    Sireesha.

    Dear Sireesha,
    Well KM supports mostly all the File server however we have some restrictions with Novell FS and Sharepoint Server from Microsoft. Like versions and other meta data have some issues.
    Alsothough to configure a File Server you need to first create a FS repository Manager. Details can be found in the help guide:
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/e3/92322ab24e11d5993800508b6b8b11/frameset.htm">FS Repository Manager</a>
    Yes WebDAV protocol is required here.
    You can create WebDav RM as well.
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/4a/217fb6c33c6748a1715a161ac942cd/frameset.htm">WEBDAV</a>
    The above links will help answer your queries.
    Regards
    Anjali

  • Is there a way to manually custom-edit the "Date created" and "Date modified" attributes of files in Mac OS 10.6?

    In "List View" in a Finder window, among the many column options are "Date created" and "Date modified." In "View Options" (command-J) for any folder, one can add these columns, along with the standard ones "Size," "Kind," "Label," etc.
    A user can alter a file's name, and a file's "label" (i.e. its color). On the other hand, a user can NOT arbitrarily edit/alter a file's official "size" -- other than by physically altering the contents of the file itself, obviously.
    But what about a file's "Date created" and "Date modified"? Can either of those be manually edited/changed, just as a file's name can be changed -- or is a file's creation-date an immutable attribute beyond the editorial reach of the user, just as a file's "size" is?
    And yes, a person can "alter" a file's "Date modified" by simply modifying the file, which would change its "Date modified" to be the moment it was last altered (i.e. right now). But (and here's the key question) can a user somehow get inside a file's defining attributes and arbitrarily change a file's modification date to be at any desired point in the past that's AFTER its creation date and BEFORE the present moment? Or will so doing cause the operating system to blow a gasket?
    If it is possible to arbitrarily manually alter a file's creation date or modification date, how would it be done (in 10.6)? And if it is NOT possible, then why not?

    sanjempet --
    Whew, that's a relief!
    But as for your workaround solution: All it will achieve is altering the created and modified dates to RIGHT NOW. What I'm looking to do is to alter the modification/creation dates to some point in the past.
    I'm not doing this for any nefarious reason. I just like to organize my work files chronologically according to when each project was initiated, but sometimes I forget to gather the disparate documents all into one folder right at the beginning, and as a result, sometimes after I finish a job, I will create a new folder to permanently house all the files in an old project, and when that folder is places in a bigger "completed projects" folder and then is organized by "Date created" or "Date modified" in list view, it is out-of-order chronologically because the creation and modification dates of that particular project folder reflect when the folder was created (i.e. today), and not when the files inside the folder were created (i.e. weeks or months ago).
    The simplest solution would simply to be able to back-date the folder's creation or modification date to match the date that the project actually started!

  • Problems in creating and storing new documents using BAPI_DOCUMENT_CREATE2

    Hi experts,
    I'm getting problems in creating and storing new documents using BAPI_DOCUMENT_CREATE2.
    I have a scenario where is defined the document type ZC1, document part 200, authorization group 0002 and for all of these  documents the storage category "Cofre DMS1". And the status which demands the storage category is 'FR'.
    I've been fullfiling the BAPI_DOCUMENT_CREATE2 in this way:
    "Tables
    data: it_doc like bapi_doc_draw2,
          it_return like bapiret2,
          it_files like bapi_doc_files2 occurs 0 with header line,
          it_objs like bapi_doc_drad occurs 0 with header line.
    "Variables
    data: wl_doctype like bapi_doc_draw2-documenttype,
          wl_docnumber like bapi_doc_draw2-documentnumber,
          wl_docpart like bapi_doc_draw2-documentpart,
          wl_docversion like bapi_doc_draw2-documentversion.
    it_doc-documenttype = 'ZC1'.
    it_doc-documentpart = '200'.
    it_doc-documentversion = '00'.
    it_doc-description = 'Test of documents creation via BAPI'.
    it_doc-username = sy-uname.
    it_doc-statusextern = 'FR'.
    it_doc-authoritygroup = '0002'.
    refresh it_files[].
    clear it_files.
    it_files-originaltype = '1'.
    it_files-storagecategory = 'Cofre DMS1'.
    it_files-wsapplication = 'PDF'.
    it_files-docfile = 'c:\110307.pdf'.
    it_files-description = 'Test file'.
    append it_files.
    refresh it_objs[].
    clear it_objs.
    it_objs-objecttype = 'EKPO'.
    it_objs-objectkey = '47000497600010'.
    append it_objs.
    CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
      EXPORTING
        documentdata = it_doc
      IMPORTING
        documenttype = wl_doctype
        documentnumber = wl_docnumber
        documentpart = wl_docpart
        documentversion = wl_docversion
        return = it_return
      TABLES
        objectlinks = it_objs
        documentfiles = it_files.
    After execute the BAPI process I got the following error:
    E26 087 - Data carrier COFRE DMS1 not defined
    Does anybody have a sugestion to help me, please?
    Thks
    David
    Edited by: David Tsutsui on Mar 18, 2010 10:52 AM

    Please refer to this thread, it tells why you need a data carrier you can also configure the same in DC20.
    Data Carriers for Storage the Originals of DMS

  • Editing a downloaded document "in place" and re-uploading it

    We're using the following procedure to download a document that has previously been uploaded to a BLOB field in the table.
    create or replace procedure download_doc (req_id in varchar2) as
    v_mime varchar2(48);
    v_length number;
    v_file_name varchar2(2000);
    v_blob blob;
    begin
    select resp_mime_type, resp_doc_content, resp_doc_name, dbms_lob.getlength (resp_doc_content)
    into v_mime, v_blob, v_file_name, v_length
    from <tablename>
    where id = req_id;
    owa_util.mime_header (nvl(v_mime,'application/octet'), FALSE);
    htp.p ('Content-length: ' || v_length);
    htp.p ('Content-Disposition: attachment; filename="' || v_file_name || '"');
    owa_util.http_header_close;
    wpg_docload.download_file (v_blob);
    end;
    The issue we're running into, is that when a user wants to download a document, the user is presented with the choice of opening or saving the downloaded document. That works OK, but what we'd really like to do is offer the user a chance to edit the downloaded document and then by saving the changes (such as by closing the window in which the downloaded document appears, after making edits), the modified document is "re-uploaded" to the database. What we have to do now is save the download document to the user's PC, then the user has to open the document and modify it, save it, and re-upload it to the database.
    Any ideas on how we can save the users a few steps and upload the document directly after editing? Thanks.

    Then the answer is no. The file needs to be saved down to CS5.5 or exported as IDML from CS6.
    Mylenium

  • How to view images in TextEdit documents on Lion, created under an earlier OS

    I have a lot of TextEdit documents with pasted pictures ("Pasted Graphic.pict") from my times on Tiger and a PPC Mac. However when viewing these documents on Lion the pictures won't appear. I can very well open "Package Contents" of the .rtfd files and navigate to the .pict files and view them in iPhoto but not in Preview, let alone in TextEdit on Lion.
    I am moving all my data from Tiger to Lion and need to be able to view the content of my documents on the new platform. Is there a trick -- a converter perhaps? I have searched online and it seems that .pict is deprecated? Please help.
    Thanks in advance,
    -martin

    Good idea, changing the files to PDF. Unfortunately I can only do that on the old system. I apologize - my question should have been "How to convert TextEdit documents with pictures to use them in TextEdit on Lion" -- I mean I can edit the text and delete the images on Lion but without seeing the pictures I am missing the context of the document's information.
    I cannot believe that I'm the only guy here with this problem. Did I paste images into TextEdit in a weird way so that I have problems now? TextEdit is THE text editor on the Mac and it seems strange to me that I cannot easily move it's data from one platform to another.
    I skipped Leopard and SnowLeopard - perhaps that's why I'm out of luck now

  • I have a PC desktop and an iPad.  I have a large library of PDF documents on my desktop that I would like to sync with my iPad.  I would like to be able to download new PDF's and make edits on existing PDF's on either device and have those edits and new P

    I have a PC desktop and an iPad.  I have a large library of PDF documents on my desktop that I would like to sync with my iPad.  I would like to be able to download new PDF's and make edits on existing PDF's on either device and have those edits and new PDFs synced to the other device.  I would also like to have my library available on the iPad even if there isn't a wifi connection (i.e., not on the cloud).  Is that possible.  I don't mind if I have to purchase a separate product or a product upgrade ect.

    You can't use an external hard drive like you would with a computer.
    You can use a USB flash drive & the camera connection kit.
    Plug the USB flash drive into your computer & create a new folder titled DCIM. Then put your movie/photo files into the folder. The files must have a filename with exactly 8 characters long (no spaces) plus the file extension (i.e., my-movie.mov; DSCN0164.jpg).
    Now plug the flash drive into the iPad using the camera connection kit. Open the Photos app, the movie/photo files should appear & you can import. (You can not export using the camera connection kit.)
    When you first connect the USB flash drive, you will only see thumbnails of the pics on the iPad; you have to import the pic file to see the full size. With your large library of pics, you will have to do this repeateably and then delete pics so you don't exceed your memory capacity.
     Cheers, Tom

  • Help needed re document properties and tracing edits of the contents

    Hi there,
    We are in a situation where we believe a document may have been edited unethically and need to find out what the terminology means.
    The original document exists in print and we have been sent a 'copy'  of the same document via email several months later.
    The date created and modified, however, is very recent.
    We know the document has been altered as it is different to the original and are trying to find out when exactly it was modified.
    It is an acrobat document created on a Mac. In the document properties box it says 'Application: Word' so I guess that means that they created it in Word and saved it as an Acrobat file?
    It says the date created is 05/06/14 and the date modified is 05/06/14.
    Does this mean that the file's content has been changed or does it just mean that it has been saved etc?
    Any help very gratefully received!

    You can't really say anything. Files don't start out as PDFs, they start out as something else like a Word document.
    So, if you have the Word document, you can make a PDF any time.
    Edit the Word document any time, and make another PDF.
    Also, computer dates can be set by anyone any time. Dates in a PDF can be changed (though not by Acrobat, but it isn't rocket science). If you are looking into this from a legal point of view, dates on a document are worthless.
    Digitally signed documents have value provided they are signed in particular ways.
    Acrobat has a compare document facility, but all this will do is confirm the changes.
    To be honest, it sounds more as if they send you a new copy from the Word document, when it was asked for. Someone might have changed the document in the mean time, without tracking the changes in a way you'd have wished.

  • How to create and edit anomalous tables in DIAdem? Such as the example list.

    How to create and edit anomalous tables in DIAdem?
    Can the tables  be edited as in MS Word?
    帖子被yangafreet在08-21-2007 10:28 PM时编辑过了
    Attachments:
    table example.doc ‏26 KB

    Hi yangafreet,
    There is no way I know of to create a DIAdem table that looks like the table in your Word document.
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

Maybe you are looking for