How do I save a string to a CSV file using applescript?

Hi,
I have an applescript that returns a string in the form:
Value1,Value2,Value3,Value4
Value5,Value6,Value7,Value8
Value9,Value10,Value11,Value12
Value13,Value14,Value15,Value16   etc.
I would like to be able to save this string as a CSV file on my desktop but I'm not sure how to do this.
Could someone help me out with this?
Thanks,
Nick

sorry, I didn't read carefully.  this is slightly better:
set theText to "some delimited text you already have..."
set filePath to (path to desktop as text) & "file name.csv"
set fp to open for access filePath with write permission
write theText to fp
close access fp

Similar Messages

  • When I try to same an image under the command 'save as' it will only let me save as file types 'firefox document' or 'all files' and when I try to look at them later they dont work. How can I save an image as the same file type it is on the web site?!

    When I try to save an image under the command 'save as' it will only let me save as file types 'firefox document' or 'all files' and when I try to look at them later they dont work. How can I save an image as the same file type it is on the web site?!
    == This happened ==
    Every time Firefox opened
    == I updated to one of the firefox versions (Not sure which one it was)

    Thanks Alex, but sadly I already tried that. Neither .docx or .xlsx files show up in the content list. They both show as a Chrome HTML document so changing how Firefox addresses those doesn't help since it thinks its the same type of file. I don't think I can manually add files into the "Content Type" left side nav.

  • How do I save a pdf as an html file without losing formatting?

    How do I save a pdf as an html file without losing formatting?  My coworker is able to do this on her Adobe 9 by saving to html css 4.0 - I have Adobe 11 and have not been able to save as an html at all without loosing formatting.

    Are the PDF files that you are attempting to Save As HTML tagged?

  • How do I save a PDF as an excel file when the PDF is horizontal. Adobe tries to rotate the page, but the data is entered in an  horizontal format.

    How do I save a PDF as an excel file when the PDF is horizontal. Adobe tries to rotate the page, but the data is entered in an  horizontal format.

    Thanks for the quick reply.  I figured out how to get the desired results by using tagging.  For anyone who may reference this post in the future, I went to "Customize" in the top right corner of Adobe, then selected "Create new tool set...", looked under "accessiblity and found the "tag" option.  Hit ok, tag is added to the toolbar.  Then I highlighted the dataset in the PDF that was relevant to the output format, then clicked "tag", saved as spreadsheet.  Sorry I can't provide more details on how tagging works or if there's a more elegant solution available, but I'm sure one's out there.

  • How do i search for a string in a txt file using java??

    How do i search for a string in a txt file using java??
    could you please help thanks
    J

    Regular expressinos work just fine, especially when
    searching for patterns. But they seem to be impying
    it's a specific group of characters they're looking
    for, and indexOf() is much faster than a regex.If he's reading from a file, the I/O time will likely swamp any performance hit that regex introduces. I think contains() (or indexOf() if he's not on 5.0 yet) is preferable to regex just because it's simpler. (And in the case of contains(), the name makes for a very clear, direct mapping between your intent and the code that realizes it.)

  • Once image is edited- how do I save it to desktop or a file to later insert it in an illustrator layout?  I tried to save it and it saved but it opens into photoshop elements editing page

    once image is edited- how do I save it to desktop or a file to later insert it in an illustrator layout?  I tried to save it and it saved but it opens into photoshop elements editing page

    Right click > Open with and choose the program to open it.

  • How do I save my contact sheets as a file instead of printing?

    How do I save my contact sheets as a file instead of printing?

    In Aperture 3 there are two print dialogs. The first is Aperture specific. After you finish this dialog the printer specific dialog will open. In the PDF menu choose Save as PDF...
    I've forgotten how Aperture 2 works but it has a different print dialog I think. Look for the same PDF menu or a Preview button.

  • How do you create a save as default folder for MP3 files used Captivate text to audio voices files?

    How do you create a save as default folder for MP3 files used Captivate text to audio voices files?

    Hi Ed
    Thank you for contacting me, however I already know how to save text to
    audio files via timeline using the Export feature.
    So my question was not entirely clear and I apologize for that.  To explain
    further, whenever I save a text to audio file, captivate takes me to a
    default save as folder where I then have browse back to my production
    folder where I am keeping all my Txt to Aud files.  This is very tedious
    process when you have alot of files to save.  So my question was is there a
    way to configure captivate so I can make my production folder the default
    file for whenever I save a Txt to Audio file through Export feature that
    the system automatically takes me to that production folder, and I am
    spared the long tedious process of saving the file manually to the
    prodcution folder I want.
    I have copy the pathway to the production folder in the URL filed in the
    Save As dialoge box and that workaround as cut the work down but I still
    have to paste that URL field to point the file to the right folder. So it
    would be nice if I could do everything automatically.  Microsoft makes this
    capability in their MS Office applications, so I was thinking Adobe might
    do the same thing.  Your help with this would be appreicated,
    Thanks
    Merrill Roberts
    Sr. Training Specialist
    SunGard Availability Services
    Direct 925-831-7730
    Mobile:415-215-9280

  • HT1553 i am upgrading my 2008 macbook to an ssd drive and want to save my settings. how do i save then? I have my files backed up with time machine ,but dont want to restore all files ,as there might be some junk backed up too. Help will be appretiated

    i am upgrading my 2008 macbook to an ssd drive and want to save my settings. how do i save then? I have my files backed up with time machine ,but dont want to restore all files ,as there might be some junk backed up too. Help will be appretiated

    When you restore from a Time Machine back up you can pick and chose what is restored. It is not an all or nothing process. Nor do you have to do the partial restores all at the same time. If days after the first partial restore you find something else you want you can restore just that.

  • How do you save an iMovie project as a file?

    how do you save an imovie as a windows file?

    You first have to format the External drive as Mac OS Extended. This can be done with Disk Utility which is located in the Utilities Folder inside the Applications Folder. Once formatted as a native Mac OS drive, iMovie will allow you to 'turn on' the visibility of the external drive. Make sure to make the hard drive visible in the Events Library by going to the View Menu > Group Events by Disk. In the Projects Folder you should also see the same drive.
    Drag your Project folders to the external drive icon in the Project Library. Also drag your Event Folders to the external drive (but make sure to drag it to the icon that is visible in the Event Library, don't drag it to the Project Library drive icon).
    This dragging operation will 'duplicate' your Project Folders and Event Folders on the external drive. So to make space on your internal drive, always delete the original folders AFTER you make copies of them on the External drive. In the future when you are importing video into a New Event, make sure to choose the external drive as the location for the the New Event folder. Similalrly create a new Project Folder in the external drive location in the Project Library.
    iMovie doesn't have save menu, it auto-saves in the background continuously as you work on the Project. That way you don't lose any work by forgetting to save the project.

  • How do i save a frame to a image file?

    im trying to save a frame from Final Cut Pro 5 to my hard disk to save and edit with an editor such as Photoshop. how do i save it. what menu options do i use?

    The first thing you should do is check out the manual. This is a very, very basic export procedure; File->Export->Using QuickTime Conversion. Then choose still image from the format menu and your file type (JPG, TIF, PSD, etc) from the Option Menu.
    -DH

  • How can i save my place in an audio book using iphone 4

    how can I save my place in an audio book using iphone 4

    In iTunes, select the Audiobook, right-click, options:
    Sync your phone.

  • How do I save and play an asx.asf file?

    How do I save and play an asx.asf file?

    Those are Windows formats.
    VLC should be able to work with them as stated at http://www.iskysoft.com/article/asf-video-converter-mac.html
    Allan

  • How do you save a webpage as a single file like internet explorer

    how do you save a webpage as a single file like internet explorer

    *Mozilla Archive Format: https://addons.mozilla.org/firefox/addon/mozilla-archive-format/
    *UnMHT: https://addons.mozilla.org/firefox/addon/unmht/

  • HT201303 how i can save my new contact in sim card using iphone 4S  ?? plz

    how i can save my new contact in sim card using iphone 4S  ?? plz

    iPhone stores no data on a sim card, thus there is no way to save anything to the sim card.

Maybe you are looking for

  • Is there a way to prevent iTunes from starting up when I connect my iPad?

    Is there a way to prevent iTunes from starting up when I connect my iPad?  We use apple configurator and would prefer to have that open up, if possible.

  • How do I minimize the backups stored on my Macbook Air?

    I'm using Time Machine onto an external hard drive, but there is more than 60GB of 'backups' in my MBA's internal storage. How do I minimize or remove that? I'll plug my Lacie external in everyday and utilize Time Machine... Any thoughts?

  • Is Hard Drive Dead???

    Hello, Thanks for anyone that posts and helps me out here. These forums help alot. I have iMac G5 Isight (model before intel) 200GB HD 2.5GB Ram. Stopped working and saw blue screen with question mark the other day. uh oh. Attempted restart -> not so

  • Cold Fusion ODBC Server (CF7)

    Just curious as to why there is a CF ODBC Server that is run be default? I thought it was necessary to run this to use data connections with CF, but it turns out all of our sites run 100-fold faster and better with the darn thing turned off and there

  • HT201412 settings are not working and only searching showing on top left

    my iphone 4s not working,i can't make a call and when i pressed the setting icon it's all come up all white screen.on top left side says only 'searching'