Existing users, log in.  New users, create a free account.  Lost password?

Mac OS X  |  iPod / iTunes  |  iTunes Artwork  |  GetArtwork  |  AppleScript fix for QT problem

GetArtwork

GetArtwork

gets CD artwork for selected iTunes songs

Version:  1.4.1

   [ Views: 633 ]

AppleScript fix for QT problem

Feedback Type:  Troubleshooting Report

Contributed by: hypert3000 Thursday, July 22 2004 @ 09:48 PM PDT

Product Platform: MacOSX

Used Product For: Less than a month

Recommend Product: NO

Spent all night on this, and found a kludgey way to get QT to accept the Copy command - use MacOS X 10.3 GUI Scripting!

I can't get this script to actually find matching albums/images at AMG, but if it could the following changes should work. It works in iTunes Companion, and the underlying Applescript code is almost identical between the two.

In the "tell application QuickTime Player" block, delete the 2 lines after "getURL theImage'. After the "end tell" (for QT), insert these lines:

tell application "System Events"
tell process "QuickTime Player"
click menu item "Copy" of menu "Edit" of menu bar item "Edit" of menu bar 1
click menu item "Close" of menu "File" of menu bar item "File" of menu bar 1
end tell
end tell

That's GUI script for picking Copy from the Edit menu! Simple, huh? It does require OS 10.3 and for you to check "Enable access for assistive devices" in the Universal Access pref-pane (see http://www.apple.com/applescript/uiscripting/ for more info).

The only other thing I had to do in iTunes Companion (and probably in here too) is change the line "set theImageData to picture of (the clipboard)" to "set theImageData to the clipboard".

Works for me! I was banging my head against the wall with this -9995 error, but this has fixed it. :-)   
System Info:

Rate this Troubleshooting Report

Was this Troubleshooting Report helpful? Yes | No

Comments

1 comments |

AutoType fix for QT problem - pauley

I ran into the same error -9995 trying to script copying in QuickTime Player for a different purpose. Your suggestion led me to a different variation on the same theme. I still happen to be running OS 10.2.4 so GUI scripting couldn't help me directly. Instead, it pointed me towards a nostalgic fix that is less clunky to type, though a lot more kludgey in terms of OS and software versions: target the Classic version of QT, use an AutoType command and run the script in Classic. The script lines that matter go something like this:

tell application "Computer HD:Applications (Mac OS 9):QuickTime:QuickTime Player" -- to run Classic's QT and not the OS X version
activate
end tell
AutoType "C" holding "Command"

And hey presto the frame you want is in the clipboard. If you're not familiar with AutoType (I wasn't) you can get this 1994 gem at http://graphics.stanford.edu/~jedavis/projects/mac/autotype.html for free. To use it, unstuff and move it to Scripting Applications in Classic's System Folder.
There's supposed to be an OS X version of AutoType in the "Extra Suites" scripting toolbox but ES isn't free and comes with some strings attached viz distributing your scripts.

Reply to This

Wednesday, November 24 2004 @ 05:12 PM PST