Go Back   The macosxhints Forums > OS X Help Requests > AppleScript



Reply
 
Thread Tools Rate Thread Display Modes
Old 11-04-2012, 12:41 PM   #1
robleach
Prospect
 
Join Date: Feb 2003
Posts: 31
Why doesn't this applescript add a face in iPhoto?

Hi,

I want to create a script that I can assign to a keyboard shortcut that will allow me to add a face to a displayed iPhoto pic. I created an automator workflow that does it, but it takes between 5-10 seconds to run (not the boost in efficiency I was looking for). I wrote a script that I was sure would do it, but while it runs without error, it does't actually add a face. Here's the script. Anyone have any idea why it doesn't work or how to fix it? I had used the Accessibility inspector and an applescript that generates the scripting interface to iPhoto to show me the scriptable elements used in this script:

Code:
tell application "iPhoto"
activate tell application "System Events"
tell process "iPhoto"
click (static text 2 of window 1) display dialog "DEBUG: Value of static text: " & (value of static text 2 of window 1)
end tell
end tell
end tell
Incidentally, the debug message shows the string to be "Add a face...".

Thanks,
Rob
robleach is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 05:00 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.