Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Feb 28, 2013, 12:02 PM   #1
evanhughes
macrumors newbie
 
Join Date: Feb 2013
Itunes applescript.

Dear all

Newbie to this forum.
What I need is an apple script to open get info for al my movies in my iTunes and then close.

My library is on an external drive and my wife tried to access itunes without the drive being on. Ultimately once I had rectified this problem I noticed that the artwork for the majority of my movies was not visible. When I get info the artwork is there and if I close the artwork appears and stays.

I tried selecting all and then selecting get info but that did not work.

The only way it seems to work is if I individually get info on each movie and then close.

Thank you in advance for any help you may offer.

Evan
evanhughes is offline   0 Reply With Quote
Old Feb 28, 2013, 04:51 PM   #2
Partron22
macrumors 6502a
 
Join Date: Apr 2011
Open iTunes, and navigate to your movies.
Select List view, not 'Unwatched' or 'Genres'.
That'll give you a complete list of your movies.
Select the movie at the top of the list and Get Info.
The info dialog that shows up when invoked from list view has 'Next' and 'Previous' buttons on the bottom left that'll let you navigate between movies.
Partron22 is offline   0 Reply With Quote
Old Feb 28, 2013, 05:58 PM   #3
kryten2
macrumors 6502a
 
Join Date: Mar 2012
Location: Belgium
Try this :

Code:
tell application "iTunes"
	activate
	reveal (some playlist whose special kind is Movies)
	set theMoviesPlayList to (get some playlist whose special kind is Movies)
	set theMovies to (tracks of theMoviesPlayList)
end tell
repeat with aMovie in theMovies
	tell application "iTunes" to reveal aMovie
	tell application "System Events"
		tell process "iTunes"
			key code 34 using command down
			click button 1 of window 1
		end tell
	end tell
end repeat
You need to enable Enable access for assistive devices in Universal Access of System Preferences for this script to work.
To avoid doing this in the future you can create an Applescript app to start iTunes and put it into the Dock. Give it the iTunes icon and remove the current one from the Dock.

Code:
tell application "System Events"
	if exists (disk "NameOfYourExternalDiskHere") then
		launch application "iTunes"
	else
		display dialog "Disk \"NameOfYourExternalDiskHere\" is not connected. Itunes failed to launch" buttons {"OK"} default button 1
	end if
end tell
__________________
Space Corps Directive 34124

Last edited by kryten2; Feb 28, 2013 at 06:17 PM.
kryten2 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Applescript to open itunes at 7am and set radio to send to airplay speaker gordo5150 Mac Programming 1 Apr 23, 2014 12:48 PM
AppleScript: How do I save multiple Excel sheets to one pdf using Applescript sbtaylor1 Mac Programming 0 Oct 28, 2013 11:38 PM
AppleScript: How do I save multiple Excel sheets to one pdf using Applescript sbtaylor1 Mac Applications and Mac App Store 0 Oct 28, 2013 11:32 PM
AppleScript - iTunes playlist? iRooney Mac Programming 0 Apr 26, 2013 05:48 PM
iTunes Applescript Help NightStorm Mac Applications and Mac App Store 2 Dec 16, 2012 02:52 PM

Forum Jump

All times are GMT -5. The time now is 04:30 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC