• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Incompatible Applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Incompatible Applescript


  • Subject: Re: Incompatible Applescript
  • From: Jerrod Fowkes <email@hidden>
  • Date: Wed, 14 Jun 2006 11:00:40 -0700 (PDT)

Jerrod Fowkes <email@hidden> wrote: I have an Applescript, fairly basic :

tell application "iTunes"
    add filename to playlist my_new_playlist
end tell

filename is a varaible that holds the absolute HFS path to the file and my_new_playlist is a variable that holds some text.

I noticed on 10.4.6 this bit works. If I run the same script on 10.3.9 it will bomb and give me this error: iTunes got an error: Can't make some data into the expected type. I have the same iTunes version on both machines (6.0.4 (3)). I discovered this when I was testing out my Universal binary. I thought that applescript was the least of my worries. I guess I was wrong.

I need to know what is going on here. I highly doubt that this would be a cocoa problem because I extracted out the script and I am running it in both Script editors on both machines and one just plain works and the other one...just bombs (10.3.9).

Any help would be appreciated.
-Jerrod

p.s. I understand that applescript can be extended per application. I have the same version here...but I didn't know that the core scripting language can change fundamentally from OS version to OS version. I have all the latest updates for both macs. If Applescript is this "breakable" from OS version to OS version...then what is the point? Any further information / discussion would be helpful here as well.

Ok I have figured out what the issue was. In this line :

    add filename to playlist my_new_playlist

it should have been

    add alias filename to playlist my_new_playlist

in order for it to work on both platforms or both "versions" of the applescript engine.

I wonder how many other "soubtleties" I can uncover since this one costed me 3 hours of development.
 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Incompatible Applescript
      • From: Uli Kusterer <email@hidden>
References: 
 >Incompatible Applescript (From: Jerrod Fowkes <email@hidden>)

  • Prev by Date: Re: Apple Data Plotting Framework
  • Next by Date: Re: Incompatible Applescript
  • Previous by thread: Incompatible Applescript
  • Next by thread: Re: Incompatible Applescript
  • Index(es):
    • Date
    • Thread