Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Some help with Applescript

Some help with Applescript
Thread Tools
littlevish
Junior Member
Join Date: Mar 2007
Status: Offline
Reply With Quote
May 5, 2007, 02:48 AM
 
Okay, I'm pretty new at Applescript.

What I'm trying to do is very simple. I want to make a script to select all the photos in a folder, and display them in the built in slideshows in OS X.

I have got the select all part down, but I can't find any way to do a right/ctrl click with Applescript. I can't find a way to press the little gear button in the finder either. Those are the only two ways to get to the slideshow option.

Here is my code so far, the working part:
tell application "Finder"
activate
tell application "System Events"
tell process "Finder"
tell menu bar 1
tell menu bar item "Edit"
tell menu "Edit"
click menu item "Select All"
end tell
end tell
end tell
end tell
end tell
end tell
     
numero
Junior Member
Join Date: Mar 2000
Location: Salem, OR, USA
Status: Offline
Reply With Quote
May 6, 2007, 02:15 AM
 
You picked a hard one to get started with. Let me know if you want a blow-by-blow analysis.

Here's what I got:

[codex]tell application "Finder"
activate
select every item of folder "sample" of folder "Desktop" of folder "numero" of folder "Users" of disk "Macintosh HD"
end tell

-- first get the Action tool bar item to drop down
tell application "System Events"
tell process "Finder"
tell window -1
tell tool bar 1
tell group 2
tell menu button 1
click
end tell
end tell
end tell
end tell

-- now make the section of the Slideshow
tell UI element 2
click menu item "Slideshow"
end tell
end tell
end tell[/codex]
-numero
( Last edited by numero; May 6, 2007 at 02:26 AM. )
     
   
 
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -4. The time now is 06:13 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,