• 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: Getting iPod Serial Number
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting iPod Serial Number


  • Subject: Re: Getting iPod Serial Number
  • From: Joe <email@hidden>
  • Date: Fri, 30 May 2008 09:50:26 -0700

Dave wrote:
I can't seem to get the following script to work reliably:

tell application "iTunes"
	activate
	set mySourceName to the name of source 3
	set the view of window 1 to playlist mySourceName of source 3
end tell

tell application "System Events" to tell application process "iTunes" to keystroke "c" using {command down}
set myResult to the clipboard


Source 3 definitely has an iPod connected to it, and if I select it in iTunes and hit Command+c I get the Serial Number copied to the clipboard.

The clipboard doesn't seem to get set when running the above Script.

Sometimes you need to change applications to use the clipboard. Try this:


tell application "iTunes"
set mySourceName to the name of source 3
set the view of window 1 to playlist mySourceName of source 3
activate
end tell
tell application "System Events" to tell application process "iTunes" to keystroke "c" using {command down}
set myResult to the clipboard
tell application "Finder" to activate


This works OMM (my pod is source 2)

Joe
_______________________________________________
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
  • Prev by Date: Re: Shell Scripting Sqlite
  • Next by Date: Re: Getting iPod Serial Number
  • Previous by thread: Getting iPod Serial Number
  • Next by thread: Re: Getting iPod Serial Number
  • Index(es):
    • Date
    • Thread