How do I get Applescript to edit the text of a file?

For a number of reasons I need to change the text of a "TXT" file using Applescript. If possible, without launching/opening text edit. Is this possible? If so how? Thanks in advance.

To answer my own question, I found an answer here: http://stackoverflow.com/questions/8141141/writing-to-file-in-applescript-not-wo rking

Similar Messages

  • How to give previleges to just edit the Text within the Portal ?

    Hi all,
    This is our first Portal project and we don't know how to do this.
    In our portal there are 6 or 7 tabs. The first tab (tab-1) is HOME, where there is corporate news to be posted.
    Usually we do all the content modification using ORCLADMIN user.
    Now we want to give access to one end user to edit the text for the corporate news on tab-1.
    But he must not change other part of the Portal.
    How can we do that ?
    Many thanks for your help.
    xtanto

    For order services, contracts and activities set object CRM_ORD_OP as I said.
    For Ibase use CRM_IBASE but with this one it is not possible to set authorizations only for own ibases. Maybe there is some other object for ibases.
    Also for business partner there is no such authorization object to shown only own partners. You have 2 options. To play with object B_BUPA_GRP but that means you will have to maintain group for each responsible employee. Or you implement logic in badi BADI_CRM_BP_UIU_AUTHORITY.

  • How can I get iPhoto to see the edited iPhone 4s photo?

    I have a new iPhone 4s.  I take a picture. I edit it and save it to the iPhone.  Then, I sync my phone with my Mac, open iPhoto.  Only the original photos appear, not the one I edited and saved.  Yet, if I e-mail the photo to myself, I can see the edited version.  So, how do I get iPhoto to see the edited version.

    8 MP is the resolution of the camera sensor.  Images are compressed when stored so quite a bit smaller.  The compression ratio depends on the level of detail in the image.

  • How can I get someone to answer the phone? I'm ready to give VERIZON my business. I sat on the phone for over 20 minutes only to be transferred to "Sales." I then sat on the phone for another 15 minutes!!!! I finally hung up.

    How can I get someone to answer the phone? I'm ready to give VERIZON my business. I sat on the phone for over 20 minutes only to be transferred to "Sales." I then sat on the phone for another 15 minutes!!!! I finally hung up.

    It takes an enormous amount of patience and time to get through to a qualified person.
    My Samsung S5 was locked out and needed a factory reset. Including attempts to achieve this locally, it took over an hour before my problem was even addressed.
    You may be interested in my journey to a very good technical support person.
    First I called the local sales person who had given me his personal business card with the friendly advice to call me with any questions. No answer at about 8:30 am when the business was open. His voice mailbox was full.
    Then I called the local store where I had purchased the phone. The person who answered the phone had learned all the proper stock phrases, but was not familiar with the issue, stated that there were no customers in the store, and I should go there in about an hour when there would be more staff. He suggested dialing *411 from my phone (which was locked). Then he gave me a number to call Verizon, which he had to look up, and it took a minute or so. The number was (removed). That is an internal number for employees and contractors and requires a code to access, obviously not designed for customers' use. He finally cut me off by stating that there were a number of customers in line waiting for his attention!
    After researching all my papers I found 800-922-0204 on my bill. The automated message suggested a hold time of 5 minutes, it took 20 minutes for a Customer Service Representative to pick up, and then I was referred to technical assistance. The hold time was announced to take 5 minutes, after 12 minutes I finally was connected.
    Fortunately I had my computer set up for Skype on a loudspeaker, and was able to do some other paperwork while waiting.
    Persistence was rewarded by having the good fortune to be connected to a very experienced, qualified and patient technical support staff with the name of Thomas (removed). He solved my problem, answered my questions during the process of resetting the phone, and gave an example of courteous and kind customer service that I had never experienced before when dealing with any major internet company.
    >> Edited to comply with the Verizon Wireless Terms of Service <<
    Edited by:  Verizon Moderator

  • How can I get an invoice from the Apple store note that the original invoice may be burned with the house though Bamkmkm Send to Olga miles is my new (email address removed)and Thanks

    how can i get an invocce from the Apple store UK ?
    Message was edited by: Host

    Find the Apple Customer Support phone number for whichever country you're in and call them for assistance.

  • How do I use AppleScript to Change the Creation Date to the Current Date?

    I sorted my downloads folder by creation date and found that the items were sorted seemingly randomly. On closer inspection, I saw that the creation dates were not the same as the dates that I downloaded the items, so I figures that Snow Leopard was using the date given to it by the server.
    In order to get the items sorted by download date, I figured I'd use Hazel, but it doesn't have a “change creation date” item. It does, however, have an “run AppleScript” item.
    So my question is this: how do I use AppleScript to change the creation date of an item to the current date?

    TC (Techno Cat) wrote:
    Okay, I tried changing the creation date with SetFile, but it kept giving me an error:
    What am I doing wrong?
    Looks like the date and time was not quoted
    Try this Applescript. It will change the creation date of every file in the Downloads folder to the current date and time:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #E6E6EE;
    overflow: auto;"
    title="this text can be pasted into the AppleScript Editor">
    set current_date_and_time to do shell script "date \"+%m/%d/%Y %H:%M\""
    tell application "Finder"
    set filelist to every file of the alias (the path to downloads folder as text)
    repeat with currentFile in filelist
    do shell script "/usr/bin/SetFile -d " & quoted form of current_date_and_time & space & quoted form of POSIX path of (currentFile as string)
    end repeat
    end tell</pre>

  • How do i get a refund from the apple store?

    how do i get a refund from the apple store. I hate the Final Cut Pro. I tried to contact costumer service and all it does is send me in circles

    You need to let go of everything you ever knew about using editing software and look at few tutorials. After years of using Final Cut Express, I looked at FCPX and didn't understand it at all, but a few months later I finally decided to give it a second try knowing that it is an entirely different animal, and that I would have to start from scratch. I bought it, read a few tutorials, explored the menus, panes, functions, read this forum extensively, then tackled my first project. It took some diligence and patience, but I got it and I will never look back. My experience is that FCPX is far better than the previous Final Cut.
    Read this: https://discussions.apple.com/thread/5251066?tstart=210

  • How can I get iMovie to recognize the external camera?

    iMAC running OSX 10.6.8 recognizes external HD Camera hardware, but iMovie fails to recognize the device.  I can copy files "manually" using Finder, but cannot import them directly into iMovie.  How can I get iMovie to recognize the camera?  I have already re-booted all devices and tried multiple USB ports.  In all cases the OS recognizes the camera, but iMovie does not.

    OK This camcorder is a fine camcorder. I have an earlier model of a similar camcorder from Panasonic. However, this newer model has one problem. It is not compatible with iMovie if you shoot at the highest quality mode, (which is 60P or 50P - which might be called 28MBPS mode). If you shoot 30P or 30i (even 60i) it will import to iMovie. Also, iMovie can handle 1280x720P60 and P50.
    It will definitely work on iMovie 11. It should probably work on iMovie 09. I doubt this camera will be recognized at all on iMovie 08, but it is worth a try. To see which iMovie you have, click iMovie/About and check the version. 9.04 would be iMovie 11. (9.08 is the current version, but it will not run on OSX 10.6.8). 8.06 would be iMovie 09. 7.1.4 would be iMovie 08.
    OK So how to work around this limitation?
    1) If you have Final Cut Pro X ($300) or can justify buying it, it will import 60P and 50P from this camera. However, if this seems a little pricey to you, keep reading.
    2) If you set your camera to record in 1080P30 and shoot a short clip, then iMovie should see the camera. Then I would suggest using iMovie import screen to create a CAMERA ARCHIVE of your camera. This will copy to your Mac the entire contents of the video files on your camera. You will need them later. I am assuming you have some valuable footage on the camera that you would like to have.
    3) Going forward, the simplest thing is to shoot in 1920x1080P30 and use iMovie normally. The biggest advantage of P60 or P50 is when you need really high quality slow motion effects. In other words, after you edit your movie, everything is converted to P30 or P25 anyway.
    4) If you want to retrieve the 1080P50 or 1080P60 clips that you have shot, then there are a couple of apps you can buy to convert them to a form that iMovie can edit. Two such apps are ClipWrap and Voltaic HD. There are also various free apps, but I cannot vouch for them. Do a search on google and you may find some that work.

  • My laptop had to be reset to factory settings. prior to that i had all my itunes songs stored on a portable drive. how do i get itunes to recognize the drive as its library?

    my laptop had to be reset to factory settings. prior to that i had all my itunes songs stored on a portable drive. how do i get itunes to recognize the drive as its library?

    If the library file is on the external drive, hold <SHIFT> while launching iTunes.  When it prompts to select a library file or create a new one, point it to the location of the library file.
    If the library file was on the internal harddrive, easiest solution is to restore it from the backup.  If no backup exists, use File > Add Folder to library.  Also under Edit > Preferences > Advanced, change the library location unless you want iTunes to move the media to the internal drive.

  • How can i get my IMEI of the iPhone i had before i made an exchange with apple SAV ?

    How can i get my IMEI of the iPhone i had before i made an exchange with apple SAV ?
    There is the serial number of the first phone and the serial number and the IMEI of the new one.
    To unlock my phone i need the IMEI of my first phone, how can i get it ?
    Thanks
    <Edited by Host>

    Try going to your Apple support profile. It may still be listed there.
    https://daw.apple.com/cgi-bin/WebObjects/DSAuthWeb.woa/wa/classicLogin?appIdKey= 58ef9db8ff4d201409e7270a68e4408ae1678e1618204c476572a1b5e5fb3518&path&language=U S-EN

  • How do i get adobe digital editions to recognise my ereader

    how do i get adobe digital editions to recognise my ereader

    What kind of eReader is it?
    Some are not supported/recognized at all.
    There are quite a few eReaders that will work with ADE 1.7.2 but not with the current ADE 2.0.1.
    Adobe do not appear to have run any product tests on ADE 2.0/2.0.1.
    ~~~~~~~~~
    There are lots of bugs in ADE2.0 (and 2.0.1).  Try replacing ADE2.0 with the older but more reliable v1.7.2.
    (You can have them both installed at once if you like.)
    Version 1.7.2, it is a little difficult to find, available on Adobe site for Windows and for Mac.
    http://helpx.adobe.com/digital-editions/kb/cant-install-digital-editions.html
    The forum software is sometimes corrupting the link above.  There shouldn't be a blank in 'editio ns.html'.  The following redirects to the same page: http://tinyurl.com/diged172
    Some people have found ADE trying to upgrade automatically. 
    It appears (not 100% sure) that if you install ADE2.0 as a new install (not as an upgrade) that your 1.7.2 will continue to run.
    Probably best to say no if 2.0.x installation asks if you want to migrate your library.

  • I downloaded the new 6 software. Me and my boyfriend share the same iTunes account and now every time I text him I also get a copy of the text sent to my from my number. How do I get that to stop?

    I downloaded the new 6 software. Me and my boyfriend share the same iTunes account and now every time I text him I also get a copy of the text sent to my from my number. How do I get that to stop?

    Go to settings > messages > send & receive
    check or uncheck the correct phones numbers and/or email addresses

  • I need to replace my laptop Hard drive.  How do I get my iTunes off the old hard drive to an external so I can put it back on the new hard drive?

    I need to replace my laptop Hard drive.  How do I get my iTunes off the old hard drive to an external so I can put it back on the new hard drive?

    Type move itunes library into the google serach bar.
    It has always been very basic to always maintain  abackup copy of your computer.  Do you not have a backup copy?

  • How can I get iTunes to display the tracks from a CD in their original (album) order?

    To be absolutely honest, I don't really understand what this box is for, so I shall just use it to repeat and expand on my question. (I have already sent a "Feedback" comment on the same topic).
    How can I get iTunes to display the tracks from a CD in their original (album) order?
    It seems to me that there is something very basic wrong with the way iTunes handles CD Tracks.
    Professionally produced CD tracks are seldom if ever in a randomised order. Why then does iTunes seem unable to display the tracks in the order they appear on the original CD source - whether from a personally owned CD or from a download from the iTunes Store?
    Some music demands a specific, non-alphabetic sequence in order to make sense. Why does it seem that iTunes only offers Alphabetic, or reverse alphabetic order - both of which make a nonsense of the original, often intended order of tracks?
    Why not replace the so-called "cover-art" in the bottom left hand corner if the iTunes window - which, while it may look attractive to some, gives the barest of information concerning the original disc, with a list of the original CD tracks in their original order, so that the user can easily reestablish the order in which they should be played.
    As I would expect legibility might be a problem with doing this, why could not the original contents, (in their original order), at least, be displayed when the "cover art" is double clicked-on - the result of which at present gives me an enlarged version of the "Cover Art". While on the subject of the contents of the source disc, what about all the album notes which someone takes trouble to write in order to increase the appreciation of the music on the CD and the listener's general background knowledge of the artists involved. Such notes, it seems to me, have considerable intrinsic value in their own account. I would, I think, normally be prepared to buy such "Sleeve notes" - so long as a "taster" was supplied (as it is for the music) - for something like the cost of a single 'Tune" on iTunes.
    These two aspects let Apple iTunes down enormously, in my opinion. I think that by chopping even quite protracted sequences of music up into bits does no one any favours - except perhaps Apple's already quite substantial bank balance. People have to be aware that two and a half, to three and a half minutes is a very short time to develop a piece of worthwhile music, and that there are many, many composers, not all of whom are alive today who have written music that huge masses of mankind value for the enrichment of their lives and the human condition in general.
    Please make the viewing of iTunes tracks in their correct order by default possible. By all means have the alphabetical variations available as offering a different approach to the music, but not the sole approach to it - PLEASE.
    Frustratedly yours
    Alan Whitaker
    PS I work at my old 24" iMac Intel Core 2 machine which runs OS "Tiger" - because it is more beautiful to look at, the screen is more pleasant to work on, and because, in some ways it is more capable (it will run FreeHand MX without needing a "patch"), than my more recent 21.5" which runs "Snow Leopard". (I don't find it that much slower, either).

    Dear Mike
    Thanks for the support. I am utterly amazed that after all the hype about how good iTunes is that it cannot play a downloaded CD in the correct order, and that what that order should be is not available directly from within one's own iTunes installation. (I know that one can go back to the iTunes Store to check what the order should be, but having downloaded the tracks surely iTunes is clever enough to retrieve this important information.
    My iTunes to differ from yours in that I have also noticed that it seems unable to download copies of my "talking books" in the correct order either. But in my case it downloads them - from a CD - in order, but with the first track downloaded first - so that it appears at the bottom of the column of tracks so that it would get played last! (At least this is, while being inexplicable, a relatively "logical" bit of blundering and because of this is relatively easy to put right!).
    I like many genres of music, some of which are not really programmed except perhaps by the artist performing them. I know that Frank Sinatra was very careful to programme his album songs to obtain a particular effect and in relation to the keys of the music. iTunes presumes to know better.
    Film scores may be totally randomly put together, in some cases, but in others the order is vital to one's appreciation of the music as a whole and how it relates to the plot of the film.
    In symphonic music most works are divided into sections and are conceived by the composer that way. Some individual sections may gain a life of their own if played separately, but they are never complete in the sense that the composer envisaged them without being placed in their proper context.
    Opera and probably most choral music too, is similar except that the words may well become meaningless if the order is changed at the whim of a piece of ill-written computer code, while ballet music has to be heard totally within its sequential context or it becomes meaningless.
    Finally, I would venture that iTunes, by jumbling up the order of the tracks as recorded on a CD, does an immense disservice, not only to the music on a particular CD, but to music in general, by expressing everything in terms of "Songs" - which it seems to interpret as stand-alone items of between 2 and 4 minutes whatever the genre. Even the way the iTunes publicity speaks of how many "songs" it can store instead of how many minutes or hours of recorded sound. This has to be another brick in the wall of "dumming-down" of people's expectations, and the shortening of their attention spans.
    I don't know about anyone else, but I feel betrayed by Apple over this. Perhaps the look, feel and general presentation of an item are not the most desirable features of a consumer product. Maybe it should be judged more on it fitness for the purpose for which it was sold. There is one other possibility - that Apple are trying to redefine "Music" - and that everything that lasts longer than about 3.5 minutes or is in the form of what could for want of a better term be called symphonic in the broadest sense is something else - not "Music" within Apple's new definition, at all!
    Well that's off my chest! now I can get down to creating some sort of order in my iTunes Libraries, knowing that I have to reconsult all the sources in order to confirm the source playing order.
    Anyway thanks again. At least I know that it is not just me
    alanfromthatcham

  • I am changing from Word to Pages. I have created my custom template with all my styles etc and that is what comes up when I go for a New Document. Fine. How do I get it to use the same Custom Template when I use Pages to open a Word document?

    I am changing from Word to Pages. I have created my custom template with all my styles etc and that is what comes up when I go for a New Document. Fine. How do I get it to use the same Custom Template when I use Pages to open a Word document?

    The template is a document in itself, it is not applied to an existing document whether it is a Pages document or a Word document converted to a Pages document.
    You would need to either copy and paste content, using existing styles, or apply the styles to the converted Word document.
    You can Import the Styles from an existing document and those imported Styles can be used to override the current document's styles:
    Menu > Format > Import Styles
    The process is simplified if the styles use the same names, otherwise you will need to delete the style you don't want and replace it with the one that you do want when asked, then the substitution is pretty straightforward.
    Peter

Maybe you are looking for

  • Problem with 7toX app

    I'm trying to import FCP7 files from an external drive to use on FCPX. I have FCPX and the 7toX app on my computer. The files on the external drive were not exported as XML files. I tried changing extension from .fcp to .xml and the app won't work. D

  • Changing a File Name for a PC user to view

    I am preparing a selection of images from a recent trip, to ultimately burn to a CD for a PC user. For example, I would like to be able to distinguish between images from Rome, Paris and London etc; How do I go about renaming files to show the differ

  • Quicktime 7.2 and Vista with RAID Arrays

    Has anybody been brave enough to install Quicktime 7.2 on their Vista computer which also has a RAID 0 or 1 array? Previous versions of Quicktime have crashed the RAID array necessitating a new computer the first time and a rebuild of the backup RAID

  • Error Installing Biztalk Adapter for Enterprise (BT2013)

    Hi everybody,  I'm attempting to install the adapter for enterprise application, the machine is a win7-64 (phisical) and previously in this laptop had BT 2010. I guess that is something related to the previous version of BizTalk.  The message is: "An

  • Zen (Agent) service delayed start

    Hi! ZCM 10.3.3 on SLES 11 SP1, Windows XP and 7 ws's. One problem or thing I noticed long time. When device is restarted then even ZCC show ws in green and agent service is started on on ws it seems to that Agent Service start is not in effect ... de