Re: question about iPhoto scripting
Re: question about iPhoto scripting
- Subject: Re: question about iPhoto scripting
- From: kai <email@hidden>
- Date: Mon, 7 Mar 2005 20:24:12 +0000
On Mon, 7 Mar 2005 10:43:05 -0600, Jonathan E Brassow wrote:
On Mar 5, 2005, at 12:52 PM, kai wrote:
Some brief additional questions:
1) Given your results above, can I assume that the following line
returns a zero?
----------------
tell application "System Events" to tell process "iPhoto" to count
windows
----------------
Yes, count is zero. It is also zero for other open applications with
visible windows, like: Safari, mail, terminal, etc.
Bummer. Seems it's more likely to be a system/System Events issue, then.
2) With the "Export Photos" window open, what happens when you run
this line?
----------------
tell application "System Events" to properties of process "iPhoto"'s
window -1
----------------
System Events got an error: NSReceiverEvaluationScriptError: 4
Right. Not too surprising, I suppose - given the above belief that
there are no windows from which to get any properties...
3) With the "Export Photos" window closed - and then open, what
happens when you run this next line?
----------------
tell application "System Events" to enabled of menu item "iPhoto" of
menu "Window" of menu bar 1 of process "iPhoto"
----------------
System Events got an error: NSReceiverEvaluationScriptError: 4
I get that too - but I wanted to make sure it wasn't just my machine.
(My reason for checking this was that some menu items become disabled
when the "Export Photos" window opens - thus offering a potential
alternative check for the presence of the window. Ho hum...) Since the
enabled property is returned correctly from a 'properties' request, I'd
guess this is a bug - which may have already been fixed in later
versions.
4) Exactly which version of iPhoto are you running? (See menu:
'iPhoto/About iPhoto'.)
It turns out, I only have iPhoto 2.0.1... I had been keeping my system
up-to-date, but had not been paying to upgrade. Sorry, I think I
misled you by accident in my first message.
No sweat - easily done, Jonathan. :-)
I'm not sure what version my iMac has, but I bought it in Nov/Dec.
If you bought it new, that should make it a fairly recent version of
Mac OS X (currently 10.3.x). I'm still on 10.2.8 (much to the amusement
of some, I'm sure) - though I'm expecting to move soon. That said, it
seems from the behaviour you're witnessing that you need to check your
system version. You can do this by selecting the "/About This Mac"
menu option.
While this is an obvious difference you and I have, I'm somewhat
reluctant to point the finger at the version of iPhoto I have - given
that the test script for counting windows does not work for me on other
applications either.
I agree - for the same reason.
I think what I am going to do at this point is go down to the apple
store and try out some of these scripts on their machines and see what
the output is. I'm virtually certain the original script is correct...
I just have to figure out what's going on with my machine.
Given that the script is GUI-based (and therefore not exactly my
favourite way to achieve results), the script works remarkably well
here. The odd hiccup when testing on another machine is only to be
expected from time to time, but I'm as disappointed as you must be that
the suggestion fell at the first fence for you.
Thank-you for all the help,
Any time. (I'm sure I needed the practice anyway.) ;-)
Good luck with your investigations...
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden