Re: System Events not working
Re: System Events not working
- Subject: Re: System Events not working
- From: "David G. Simmons" <email@hidden>
- Date: Mon, 7 Apr 2003 13:14:25 -0700
I couldnt' agree more with your rant!!! The fact that I have had to
resort to GUI scripting in order to export photos from iPhoto in a
chosen size (rather than full-size) is highly annoying, and plagued
with errors.
sigh, if only I could "export selected photos with size 800x600" etc.
You would not BELIEVE the nesting and complexity of the export items in
iPhoto
dg
On Monday, April 7, 2003, at 12:11 PM, Andrew Oliver wrote:
Ummmm...?
What's wrong with:
tell application "Finder" to set collapsed of window 1 to true
It works in one line.
Does not require GUI Scripting to be installed.
Does not require the Finder to be the frontmost application.
Is portable - will work on any Finder version on any System, including
non-English systems.
(People seem to forget that referencing menus by name is inherently not
portable - it will not work in a French Finder, or a Spanish one,
Japanese
one, or any other non-English system)
<rant>IMHO GUI Scripting is creating a whole new suite of AppleScript
problems... Too many people are trying to directly replicate the
actions
they would take manually to perform a task - "click this menu bar,
pull down
this menu, select this menu item" when there are much more direct ways
of
achieving the desired result - "minimize this window"
GUI Scripting should be a last resort. It's a shame that it is
required at
all to automate some tasks.
</rant>
On 4/7/03 11:40 AM, "John Delacour" <email@hidden> wrote:
At 2:11 pm -0400 7/4/03, Robert C. Jacobson wrote:
tell application "System Events"
tell process "Finder"
tell menu bar 1
click menu item "Minimize Window" of menu "Window"
end tell
end tell
end tell
Am I missing something real basic here?
It works fine here, provided you bring the Finder to the front first,
and you can do the whole thing more economically like this:
tell app "System Events" to tell process "Finder"
set frontmost to true
keystroke "m" with command down
end
--JD
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
--
David G. Simmons
Ever notice that even the busiest people are never too busy to tell you
just how busy they are.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.