Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Applescript, iTunes & FileMaker 8

Featured Replies

  • Newbies

Here is the Applescript code run from within FileMaker that copies the CD info from iTunes and inserts it into FileMaker. However it no longer works with FileMaker 7 or 8. It only copies the first track and inserts that track and that is all. The layout used to insert the tracks is a layout with a Self Join relationship showing only the portal.

I did not write the original AppleScript, I'm "almost" totally lost. But understand enough to fix this if I had the right direction. Can anyone tell me what needs to be done?

on run

clearProperties()

tell application "iTunes"

set thePlaylist to front window's view

copy every track of thePlaylist to allTracks

set trackCt to count of allTracks

repeat with i from 1 to count of allTracks

copy item i of allTracks to thisTrack

set currArtist to (thisTrack's artist as string)

set currGenre to (thisTrack's genre as string)

if i = 1 then

copy (thisTrack's album as string) to diskName

copy (thisTrack's artist as string) to diskArtist

copy (thisTrack's genre as string) to diskGenre

else

if currArtist is not diskArtist then

set diskArtist to "Various Artists"

end if

if currGenre is not diskGenre then

set diskGenre to "misc"

end if

end if

copy (thisTrack's name as string) to end of allNames

copy (thisTrack's artist as string) to end of allArtists

copy (thisTrack's year as string) to end of allYears

copy (thisTrack's genre as string) to end of allGenres

copy (thisTrack's album as string) to end of allAlbums

set currTime to (thisTrack's time as string)

set currTime to ("0:" & currTime as string)

copy currTime to end of allTimes

set trackNum to (thisTrack's track number as string)

if trackNum = "0" then

set allTnums to 0

end if

if allTnums is not 0 then

copy (thisTrack's track number as string) to end of allTnums

end if

copy i to end of trackCounter

end repeat

end tell

enterData()

clearProperties()

end run

on enterData()

tell application "FileMaker Pro"

activate

go to layout "iTunes Importer"

try

set newRec to create new record

show newRec

activate

with timeout of 5000 seconds

try

set cell "CD Importer SELF JOIN::TPDiscNumber_Name" of newRec to allAlbums

set cell "CD Importer SELF JOIN::TrackTitle" of newRec to allNames

set cell "CD Importer SELF JOIN::ArtistLastNameGroupName" of newRec to allArtists

set cell "CD Importer SELF JOIN::TrackGenre" of newRec to allGenres

set cell "CD Importer SELF JOIN::TrackLength" of newRec to allTimes

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.