• 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
Applescript Toast image --> image mount -->Itunes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Applescript Toast image --> image mount -->Itunes


  • Subject: Applescript Toast image --> image mount -->Itunes
  • From: Rasmus Kreiner <email@hidden>
  • Date: Wed, 24 Nov 2010 23:24:06 +0100

Hi list,

Sorry to interrupt with a noob question. I'm trying update my sfx database, and thought that I could use the gracenote database via itunes for this. This is a lot of files, 500 gb of audio wav, and i don't - for obvious reason -  want to do all this manually. Therefore i'm trying to develop a script that wiil do this. I got this to work when i select a single folder. That script looks like this:

set folderSelected to choose folder "Select a folder"
set DokumentNavn to "Macintosh HD:Users:rasmus:desktop:a"
set DokumentNavn2 to POSIX path of DokumentNavn

tell application "Finder" to set {folderName, sourceList} to {name of folderSelected, (items of folderSelected) as alias list}

tell application "Toast Titanium"
activate
set myDisc to make Audio disc
set (name of myDisc) to folderName
add to myDisc items sourceList
save myDisc as disc image DokumentNavn
delay 2
mount image DokumentNavn2
end tell

tell application "iTunes"
activate
end tell

But what I'd really want is to do a script that will  allow me to choose a folder which contains a lot of sub folders and have those run thru the above routine one by one.I''ve come up with this, but i doesn't work as i expect:

set counter to 1
set ToastCounter to 1
set folders1 to choose folder

set folders2 to items of folders1 as list

set foldercount to length of folders2

repeat foldercount times
set folderSelected to item counter of folders2
set DokumentNavn to "Macintosh HD:Users:rasmus:desktop:a"
set DokumentNavn2 to POSIX path of DokumentNavn
tell application "Finder" to set {folderName, sourceList} to {name of folderSelected, (items of folderSelected) as alias list}


tell application "Toast Titanium"
activate
set myDisc to make Audio disc
set (name of myDisc) to folderName
add to myDisc items sourceList
save myDisc as disc image DokumentNavn
delay 2
mount image DokumentNavn2
end tell


tell application "iTunes"
activate
delay 30
end tell


set counter to counter + 1
set ToastCounter to ToastCounter + 1


if ToastCounter = 10 then
tell application "Toast Titanium"
quit
set ToastCounter to 1
end tell
end if
end repeat 

Can one of you tell me where I'm wrong with this script. Keep in mind that i don't understand some basic concept of applescript so be gentle ;)

Looking forward to your response!

Best regards,
Rasmus Kreiner


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Applescript Toast image --> image mount -->Itunes
      • From: Thomas Fischer <email@hidden>
  • Prev by Date: Re: Quark 7 select document 2
  • Next by Date: Re: Applescript Toast image --> image mount -->Itunes
  • Previous by thread: Re: Quark 7 select document 2
  • Next by thread: Re: Applescript Toast image --> image mount -->Itunes
  • Index(es):
    • Date
    • Thread