Applescript help for Exporting Playlist

I have two Imac...... my business mac at a resturant/bar for djing and my home Imac for purchasing and orgainizing my music collection.
I frequently replace music audio and video files for better quality versions,
This is causing me headaches because at work we might have a lot of smartlists which are based on ratings and other tags.  I need to get the tags from the old files imported into the updated versions of those files.
I found this script which looks like it may solve my problem but I need help fine tuning it for my needs.
This script takes as input a Music.txt file created with iTunes' File > Export command. It then applies the song ratings found in this file to the same songs in the current iTunes library. The song name, artist, and album must match; otherwise, the rating will not be affected. If they do match, the current rating will be replaced.
IMPORTANT: Before running this script, the Music.txt file must be encoded as UTF-8. To do so, simply open Music.txt in TextEdit (or a similar editor) and re-save the file with UTF-8 encoding.
set the_file to Flix Media/Flix Music/All Media/Music.txt
set music_lines to read the_file using delimiter {return}
display dialog "This script may take a very long time to run, depending on the size of your iTunes library. (Processing a 2000-song library required approximately 20 minutes on a 2.5 GHz MacBook Pro.)" & return & return & "Do you still want to continue?"
-- Split the line at tab stops
set text item delimiters to ASCII character 9
-- Start at 2 instead of 1 to skip the header line
repeat with i from 2 to count music_lines
          set music_line to item i of music_lines
          set music_fields to every text item of music_line
          if length of music_fields is 27 then
                    set the_name to item 1 of music_fields
                    set the_artist to item 2 of music_fields
                    set the_album to item 4 of music_fields
                    set the_rating to item 26 of music_fields
                    tell application "iTunes"
                              set the_tracks to (file tracks of library playlist 1 whose name is the_name and artist is the_artist and album is the_album)
                              repeat with the_track in the_tracks
                                        set the rating of the_track to the_rating
                              end repeat
                    end tell
          end if
end repeat
Problem 1  
What am I doing incorrect with my file path?  My computer has a separate partition called Flix Media
This is what I typed :
set the_file to Flix Media/Flix Music/All Media/Music.txt
but it errors out on Flix Media.
The original script had this:
set the_file to choose file      
Problem 2
I would like to automate this script to run at night. (I have a few scripts that need to run at night prior to this.)
Is there any way to save the music.text file with an applescript, then re-open it in a textEdit and re-save it as a UTF-8 format?
It this could be done then the running of this script could follow.
Any help or ideas would be greatly appriciated....
Ron

I just figure what was wrong with my file path.
set the_file to "Volumes/Flix Media/Flix Music/All Media/Music.txt"
So all I need is help with problem 2.
Thanks.....
Ron

Similar Messages

  • How do I get tech help for export pdf during Australian business hours?

    How do I get tech help for export pdf during Australian business hours?

    You can post your issues in this forum or send your questions to DL-exportpdf_feedback.
    Jyh-Jiun Liou

  • Help for export to IMOVIE

    Hi I am french and Im lost ! I try to export my videos on my ipod touch 4 to my computer (windows) and i dont know how i can do it!!! please help me ,thanks!

    Any help on how i might pause the last frame after an animation. Add a duration to a frame after the animation is complete?
    Also, i export as a .mov file which is nice, high definition. To get the file into IMOvie I have to convert to .dv, and then I lose the crispness. Any ideas for maintaining resolution?
    thanks,
    andy.

  • Need help for Export to XML Functionality

    Hi All ,
    I have developed a report in Apex2.2 to export the data into XML format .
    I have used "export to XML" functionality and "HTF.escape_sc" function to escape special characters.The query is as follows..
    select
    HTF.escape_sc(replace (e.EVENT_NAME,'''','&'||'apos;')) AS EVENT_NAME ,
    HTF.escape_sc(replace (e.VENUE_NAME,'''','&'||'apos;')) AS VENUE_NAME ,
    HTF.escape_sc(replace (e.VENUE_ADDR,'''','&'||'apos;')) AS VENUE_ADDR ,
    HTF.escape_sc(replace (e.DESCRIPTION,'''','&'||'apos;')) AS DESCRIPTION ,
    HTF.escape_sc(replace (e.TRACKING_URL,'''','&'||'apos;')) AS TRACKING_URL ,
    HTF.escape_sc(replace (d.primary_product,'''','&'||'apos;')) AS primary_product
    from events e ,d_01 d
    where
    d.event_id = to_char(e.event_id)
    and e.publish = 'external'
    and e.searchable = 'Y'
    The output result in XML in APEX2.2 is absolutely fine , but when i moved the application to apex.oracle.com the XML report instead of '&' it is displaying "%26amp" .
    Is there any problem with APEX3.3 .
    Appreciate your quick response.
    Thanks
    Jyoti

    Jyoti,
    Replacing special characters from where? Report? Replacing by what?
    The code for the package is open. You may use the part in the package body:
    FOR i IN 1 .. CEIL (v_xml_l / 4000)
          LOOP
             v_xml_cut := SUBSTR (v_xml, v_count, 4000);
             HTP.prn (v_xml_cut);
             v_count := v_count + 4000;
          END LOOP;
    ...and do something like
    HTP.prn (REPLACE(v_xml_cut, '&', '<'));
    ...Denes Kubicek

  • Applescript Help for TextEdit

    I want to be able to select each paragraph from a long rtf file and save it in another document.
    Say my doc has 25 paragraphs and I want to get 25 different documents containing each different paragraph.
    Any Help?
    Thanks

    tell application "TextEdit"
    repeat with aParagraph in paragraphs of document 0 as list
    set newDoc to make new document at end of documents
    set text of newDoc to aParagraph
    end repeat
    end tellThis assumes the document you want to extract from is the frontmost document.
    Also, you should use the [Applescript|http://discussions.apple.com/forum.jspa?forumID=724] forum under Mac OS X Technologies.

  • Allocating buffer for export plugin

    Hi in the docs this tis stated "Unfortunately, Export modules must track the buffer for the data requested from the host even though the host allocates the buffer. This means that the Buffer suite routines do not provide much help for Export modules.".
    What does this mean?
    That I should not use the Buffer suite when I write an exporter, and resort to malloc type functions for memory allocation?
    Or is there a special way of handling the buffers when in an export module?
    Thanks
    Dimi

    Yep using the Pica Buffer handle callbacks, did work at least for allocating/deallocating within one function.
    Here are the function pointers I used, It took me some time to find what to do since there is no straight example in the documentation.
    I found the PoorMansTypeTool helpfull in showing how this can work.
    //intiialize in InitGlobal
    if (gStuff->sSPBasic->AcquireSuite( kPSBufferSuite, kPSBufferSuiteVersion2, (const void **)&gPSBufferSuite64)) gResult = errPlugInHostInsufficient;
    //Get buffer
    unsigned8 *rowBigData = (unsigned8 *) gPSBufferSuite64->New(NULL, gStuff->imageSize.h*gStuff->imageSize.v*gStuff->planes);
    //Displose buffer
    gPSBufferSuite64->Dispose((char**)&rowBigData);
    Tom what is the difference between the kPSBufferSuiteVersion1 and kPSBufferSuiteVersion2. The buffer suite 2 seems to have both 32 and 64 bit allocating functions.
    Thanks
    Dimi

  • Help! Can't save to disc/backup my iTunes! NO OPTION to save OR back up to disc my iTunes Library appears in the toolbar when I select 'File', then 'Library'. Just 'Organize Library...', 'Export Library...', 'Import Playlist...', and 'Export Playlist...'

    Help! I can't save to disc OR backup my iTunes Library! iTunes support instructions are to simply select 'File', then 'Library', then select 'Back Up to Disc', but when I try to the only options that appear are 'Organize Library...', 'Export Library...' then below those are 'Import Playlist...' and 'Export Playlist...' (which appears in the list, but I cannot select). No option to save my library appears at all. Just those four. I've had no problems syncing, playing, adding or purchasing with my account and my iTunes version is up to date. Can anyone tell me what the problem is and what I should do so I can save my library?

    See iTunes for Windows- Moving your iTunes Media folder

  • Exporting playlists to ext. memory stick? Please help.

    Anyone know if it is possible to transfer/export playlists from itunes to an external memory stick?
    I am hopping there is an easier way to export the playlist as a whole rather that manually dragging and dropping individual tracks using finder?
    Can anyone help us on this one?

    Applebags wrote:
    Thanks for your advice Jolly but I have tried to export and drag the playlist into the memory stick using finder and only the .txt file is transferred. Must I be doing this incorrectly?
    no. i may have misinterpreted your intention. i thought you wanted to put the playlist on another computer. you can import the resulting .txt file in iTunes on another computer, however, the actual tunes would have to be present in the other machine's library for the playlist to work.
    It seems to work if I select multiple files from the playlist then drag to memory stick.
    yes.
    I hope there is a simpler way.
    there ain't. you could burn the playlist as an mp3 CD which can be imported on another machine ...

  • Help with exporting HD for use in DVDSP.

    Hi Guys,
    Very glad I found this forum as I am just out of ideas to get this working. Here is the situation:
    I have a project of a wedding in HDV, which contains 3 sequences with the following lengths:
    The Service = 45mins
    Photoshoot = 5mins
    Reception = 80mins
    I have decided I would like to have the Service + photoshoot on ONE DVD and the reception on ONE DVD. If possible? If not possible I will have the reception spread over two but i do not see the need.
    First of all I have a Powermac dual 1.8 which doesn't have a dual layer dvd burner, so to have a higher quality result and to be able to fit more on I have decided I probably best to get a Dual Layer burner to do this project.
    But before I do that, I need to work out what is the best settings for exporting this project out of FCP 5.1 to work on a SD DVD? Do I use compressor? If so which preset or what settings of my own? I have tried various things and I honestly get lost and my project in DVD SP is around 12GB. So i try exporting again with other ways in compressor and then the quality just looks terrible.
    The FCP project is all in HDV with apple intermediate codec so I would be exporting from that, but obviously only need the DVD in SD!
    If it helps converting the HD project to SD/DV I can do that with the sequence which I did try and then some more export experimenting but it looked really bad.
    Please help guys I am desperate and no idea on what to do here.
    I really appreciate your time, feel free to ask me anything to help you determine what I should do.
    Thank you so much.
    Matt
    G5 Dual 1.8ghz   Mac OS X (10.4.10)   2.5gb ram, 320gb + 160gb + 320gb ext.

    Thanks for the reply.
    How can I set the audio in the DVD SP project?
    I am using the "default" settings now which are 4.0 and 7.0 and it still says too high? Whats the deal
    Here is the log:
    Starting DVD Build HAWKESDVDPROJECT...
    Compiler Initializing...
    Precompiling Project HAWKESDVDPROJECT
    Compiling VMG Information...
    Created 9 PGCs in VTSM1
    Created 5 PGCs in VTSM2
    Created 5 PGCs in VTSM3
    Created 5 PGCs in VTSM4
    Created 5 PGCs in VTSM5
    Created 8 PGCs in VMG.
    1 Menu(s) will be created...
    Compiling Menu PGCs...
    Compiling Menu#1 (Menu 1)...
    Rendering Menu:Menu 1,Language:1...
    Generating Transition: VTSM #01, VOB #1...
    Generating Transition: VTSM #01, VOB #2...
    Writing VIDEO_TS.VOB
    Compiling Menu PGCs...
    Writing VTS020.VOB
    Compiling Menu PGCs...
    Writing VTS030.VOB
    Compiling Menu PGCs...
    Writing VTS040.VOB
    Compiling Menu PGCs...
    Writing VTS050.VOB
    5 VTSs and 5 Titles will be created...
    Compiling VTS#1 (PhotoShoot-uncomp8bit (Video))...
    Muxing VTS011.VOB
    Done.
    Compiling VTS#2 (PhotoShoot-uncomp8bit (Video)-2)...
    Writing VTS020.VOB
    Muxing VTS021.VOB
    Done.
    Compiling VTS#3 (PhotoShoot-uncomp8bit (Video)-3)...
    Writing VTS030.VOB
    Muxing VTS031.VOB
    Done.
    Compiling VTS#4 (Service-uncomp8bit (Video))...
    Writing VTS040.VOB
    Muxing VTS041.VOB
    Video Bitrate Too High
    I'm not sure whats going on with 3 different photoshoots? I am so lost and restarted the project about 4 times now.
    Mode: One Pass?
    Motion Estimation?
    Any suggestions? Sorry to keep bothering you.

  • 'Preparing data for exporting' takes forever (Urgent, please help)

    Hello,
    I'm currrently editing a 1920x800 anamorphic Full HD project on Premiere Pro CS5. The original full HD clips were replaced with AE-comps using Dynamic link for color grading. The project is 15 minutes long and mainly consists of linked AE-comps. The sound is filled with gunshot sound effects, music and original recorded audio. That audio is also linked with Soundbooth for some postwork.
    Here's the problem: when i hit the 'Export' on Premiere pro I get the window, i choose my settings (H.264 10 mbps) and then when I hit the 'Qeue' button it shows the progress bar 'Preparing data for export' and Media Encoder starts up normally. The problem is nothing happens afterwards. The project doesn't get loaded in AME and the progress bar keeps on telling forever that it's 'preparing data for export' Normally this process only takes up a minute or 2 max. How can i fix this?
    Editing rig:
    27 inch imac
    4 gigs ram
    2.53 i5 processor
    ATI 4850
    Please help me with this, my deadline is within 4 hours
    Thank you!

    I have some suggestions you can try.
    1. Can you try exporting directly from inside Premiere, instead of adding to AME from PR?
    - press the Export button inside the Export Settings Dialog, not the Queue button
    2. Can you import the sequence directly into AME?
    - launch AME, File menu\Add Premiere Pro Sequence
    3. Try using a different format other than, H.264.
    4. Try using PR CS5.5. You can download the trial version and use it for 30 days.
    Hope this helps. If not, please re-post with test results.
    Thanks

  • My ipod shuffle 4th gen bought today and the voice over works for naming playlist and battery percent but wont name song and artist can anyone help also is the voice over button meant to be soft when pushed ?

    my ipod shuffle 4th gen bought today and the voice over works for naming playlist and battery percent but wont name song and artist can anyone help also is the voice over button meant to be soft when pushed ?
    thanks

    This document explains setting up and using VoiceOver.
    http://support.apple.com/kb/ht4322
    The overall settings for VoiceOver is on the shuffle's Summary screen in iTunes.
    Artist name and song name - Press and release the VoiceOver button. 
    The playlist menu - Press and hold the VoiceOver button.

  • Noob Request For Exporting Help

    Hi
    I took approximately 2.5 hours of video of my son's wedding last year using my 3CCD Panasonic NV-MX300 video camera and want to create an authored Bluray from the footage, which is spread over 3 DV Video tapes.
    My basic principle was this: - to capture the footage as is to my PC and then edit it a little and do some work on parts of the sound which came out poor because I forgot to "zoom" the mic doh!  Then I simply wanted to Export the timeline in order that the "finished Video" can be authored in another program.
    My work with Adobe Premiere CS5 is extremely limited but after watching some tutorials, I have managed to capture the 3 DV tapes and have 3 clips (the 3 full tapes) in my Project.  2 of these clips are roughly 10.5 Gb's each and another 13.7 Gb - so 35 Gb ish of captured footage.  I have placed these in the timeline and juggled bits of them into the right order using the Razor Edit Tool and have manged to increase the sound relative to the overall video in the half dozen sections which were "quiet".  From my point of view this has been a huge learning curve and I have come from knowing nothing about this program to this point in a matter of a few days.
    So when I open my "saved" project, it opens exactly as I want it to and plays perfectly within Adobe Premiere's timeline.  The footgae has hardly been cut as I want the completed video as it was shot, save for the few bits I have cut and replaced elsewhere - for example there was a bible reading which I wasn't able to take properly at the time but managed to get the 2 participants to do it after the service and I have managed to place the reading into the exact part of the video as if it were shot during the service.  As I have said, I used the razor tool to do this by using in and out points then cutting the portion between the two points and then inserting it at the correct position in an earlier section of the timeline.  Using in and out points and the razor tool to create secondary clips within the 3 main clips was the technique I used to increase the volume within some of these secondary clips.  My timeline is now perfect for me but so far hasn't been rendered.  I am not sure what rendering is about and whether it is necessary to render the whole timeline before exporting.
    I then tried to export the timeline.  I want quality footage, which is hardly any different to the original.  The video was shot Widescreen PAL at 720 x 576, 25 fps 32000Hz stereo - lower (these are the details from the "Exxport/Media" screen.
    I do not want to degrade the quality so experimented the other day and exported to H262.Bluray 1440x1080, with 48000Hz stereo sound thinking this would give me a nicely sized video ready for Bluray authoring.  I used 2-pass encoding and after a small while the estimated time was going to be around 30 hours.
    I am using a Quad 660 processor with Windows 7 64-bit.  My OS is within a RAID 1 setup and my scratch disk within a separate RAID 10 setup.  I wasn't overly concerned with this time as I wanted a quality output.  Last night after returning home from work, the encoding had completed but the Sequence01.m4v file came out at massively reduced and compressed at about 7.8Gb which wasn't what I expected at all and the quality was lousy breaking up, blocky and stuttering.  The sound wasn't there as obviously it was captured as a separate .wav file so I then decided to remux the two files in tsMuxer but the resultant .m2ts file played the sound ok but not the video which paused on the opening frame!
    OK so maybe my export settings were hopeless.  Maybe I should have gone for an uncompressed Microsoft Avi file for export?
    Before I experiment further maybe I can ask you guys with vastly more experience what I should do now please?
    As I have said the timeline isn't rendered yet - does it have to be before exporting?  My requirements are simple - to have a single video/audio file with quality matching the original.  My concern isn't the time it takes to export, just so long as I end up with 1 video with synch'd sound ready to author.  In this latter respect I will use Menus and Chapter points for navigation - am sorry but Encore is beyond me so will be using a third party program I have used before and will include some slide shows too.  Previous authoring has been limited to 2xsingle layer dvd's and 1xdual layer dvd's.  This time I want to improve quality somewhat with an aim to play back on a bluray BD25 - with additional slideshows etc and music tracks to acompany the slide shows/menus, I was thinking of limiting the export to no more than say 15/20 Gb's but obviously more that the 7.8Gb achieved after my first attempt.
    Thank you for reading this far - any help and advice would be greatly appreciated.
    Please bear in mind I do not now want to amend my timeline in any way as I have spent enough time on it already, so really need answers limited to improving the quality of my export.
    TIA
    Paul

    Thanks Ann - I think you have nailed the problem.
    I am really struggling now as I found out yesterday that VideoStudio Pro X4 doesn't do what I want it to in giving me automatic options to add slideshows/music tracks and menu templates as MovieFactory does.  Having upgraded to MovieFactory 7 now, so as to take advantage of it's BluRay capabilities, I am back with the original problem
    VS seems to allow you to "Distort" the video back to 16:9 format but this is not an option in MovieFactory.. When I experiment with it's Multi-trim options, it plays back perfectly but after exiting that screen by pressing OK you then end up where you began so I am totally confused now.
    I do have 2 things though: -
    1.  My saved edited Project in Premiere CS5
    2.  A 35 Gb .AVI file exported from 1. which plays back perfectly in Premiere, VLC Player and Windows Media Player.
    If I have to I will export again from my saved project in Premiere but would need to know precisely what "export" settings to use which will flag up the resultant video in MovieFactory.  I honestly cannot remember now what settings I used but remember that export took about 90 minutes.  The export which DH described did not work and I have since deleted the file as it was terribly blocky and stopped and started every few seconds etc.
    Now if I though Encore would give me "automatic" options to add slideshows music, Template Menus which I could play about with with videos embedded within them etc etc then I would jump straight into it.
    My Deadline is to have a fully completed DVD/BluRay disc finished by 22nd May - I have 20 days to do this!
    Hope you can help some more
    Paul

  • Script for export in datapump  -- help needed !!!

    hello all,
    i am using the following script as batch file in my database for export
    script:
    =========
    exp name/password file=d:\exp\%date%.dmp full=y log=d:\exp\exp.log an this will replace the first file(monday) on next monday.
    similar way i need a script for data pump for full database export using datapump
    thanks ,
    gold

    login to database as a dba and create directory for your dumpfile path.
    create directory dpump_dir as 'd:\exp';
    and then use the below script for export.
    expdp username/password full=y directory=dpump_dir dumpfile=%date%.dmp logfile=exp.log

  • Help setting up sharing for music playlists family sharing vs home sharing

    how do I set up sharing for music playlists for my iPad ios8 and sister new iPad.
    previous set up was home share between our macs. Now want to share with iPads added to the mix
    does family share offer playlist sharing
    how does (or not) match come into the set up
    please clarify home sharing. Family sharing and the use of match
    what is the best set up for me. If I use family share do I sign out of home share

    You are comparing two quite different concepts, you may want to look at the following articles.
    Family Sharing and Apple IDs for kids
    Understanding Home Sharing
    iTunes Match

  • Exporting playlists, mebbe I'm confused

    I use a plethora of Smart Playlists (SPs) to manage my iTunes database. I use a nice program that manages to sync my iTunes library between two separate Macs, but it won't copy SPs. To avoid having to manually recreate all the playlists on both computers, I went looking for a solution that would allow me to simplify the process.
    It seems that File>Library>Export Playlist... should do what I'm thinking, but the option is greyed out and unavailable for selection. When I search help for the topic, iTunes decides to be a wise guy and literally point at the greyed out menu item. Mocking me.
    It's less than a week old and my Mac's already mocking me. Granted, it's an improvement from open detestation from my Windows PC, but still infuriating. Thanks in advance for any help anybody can provide!
    - THOR

    FWIW, should others come across this inquiry: you cannot currently (as of version 8.2.1) export Smart Playlists as a built-in function of iTunes. However, Doug's AppleScripts for iTunes does have a script that was a solution to my problem; it can be found here: http://dougscripts.com/itunes/scripts/ss.php?sp=exportsmartcriteria

Maybe you are looking for

  • Error 48 when installing creative cloud for desktop on mac

    hi jeff when installing creative cloud for desktop we have this problem, tried everything but no success on mac osx lion  the message that gives creative cloud for desktop app on installing is this: error code 48, a critical file/directory can't be a

  • IMac early 2008 occasional screen flicker with external monitor

    I am experiencing flickering with my early 2008 iMac when driving an external monitor. My Thinkpad is flawless when pushing out to the monitor. It will be fine, but occassionaly (every 5-20seconds) the screen gives a little flicker, about 1/4 of a se

  • Incorrect Search Results in Acrobat Reader 9.2.0

    Anybody ever see this? I'm searching for a word in my pdf, in this case the word "sport". When I click for the results the reader can't find the word, but instead it takes me to other words that are not even close to "sport" like "descision", or a nu

  • Flash media encoder - "compatible analog to digital converters"

    anyone know which analog to digital converters are compatible with FME? I'm needing to get analog input up onto FMS. I'm thinking FME is the solution but I need to know what hardware to buy and I'm not getting anywhere quick. Not even Adobe sales cou

  • Strange "Help Icon" on start up

    My G4 won't startup fully. I get a strange blue on white help icon in the upper right corner of the screen and that's it. The full menu bar never finishes coming up. I have tried repairing the disk, first with the install CD then with Disk Warrior. D