Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • for me (on OSX.3.4 and iTunes 4.6) it works like: tell application "iTunes" set currart to artist of current track set curralb to album of current track open location "http://www.walmart.com/catalog/search-ng.gsp?search_constraint=0&search_query=" & currart & " " & curralb & "&Continue.x=18&Continue.y=10&ics=20&ico=0" end tell Note the change in Walmarts search string, and that open location goes to iTunes, not Finder (which didn't work at all for me, I used Safar
    • Yes. I modified mine to do both those things recently. Here's my current script.
      tell application "iTunes"
          set currart to artist of (first item of selection)
          set curralb to album of (first item of selection)
      end tell
      set currargs to do shell script "perl -MURI::Escape -e 'print uri_escape(shift), q[%20], uri_escape(shift)' " & quoted form of currart & " " & quoted form of curralb
      tell application "Safari"
          activate
          open location "http://www.walmart.com/catalog/search-ng.gsp?search_constraint=4104&search_quer y=" & currargs
      end tell
      • Yes, thank you, found out about that selection thing too, in the iTunes example scripts from Apple. Very nice now! Do you think it would be possible (and feasible) to use perl and regexp or something to parse the resulting page and retrieve the cover image directly?
        • Probably, though I never wanted to. I prefer to see the image first. Mostly these days I just use Clutter, an app that will fetch the cover image and apply it to the music files for you.
        • Hi Everybody! I'm not computer savvy. I have had my iPod Photo since March. Have been using it like crazy and have bought tons of song from iTunes. I tried connecting since yesterday and it's not working :( I has able to connect sunday! I haven't done anything new to my computer everything is the same. ACtually I logged off on sunday and started it up again yesterday and iTunes is the only thing not working. I called apple and the want to chatge me again for the same problem eventhough they can't fix it. T