Re: Printing contents of the active Desktop window
Re: Printing contents of the active Desktop window
- Subject: Re: Printing contents of the active Desktop window
- From: Scott Thompson <email@hidden>
- Date: Thu, 16 Aug 2007 09:30:18 -0500
On Aug 16, 2007, at 9:08 AM, email@hidden wrote:
I'm looking into the AppleScript option right now, but I have
another idea.
I would think that the AppleScript is really the best way to go. You
could start with something like:
tell application "Finder"
set targetContainer to the target of window 1
return the URL of every item in targetContainer
end tell
and run the script to get back a list of URLs for each of the items in
the window.
If I can trigger the Finder's Edit->Select All, then Copy, perhaps I
can get
some file paths in the clipboard and then back up one path component
to get the
window's (really, the directory's) filesystem path. That would work.
(although clumsy, I know). Hmmm, how to activate the menu, I will
check.
Trying to control the user interface is not a winning proposition in
the long run. It seems unreasonable now to expect that the menu
structure might change, but look at the travesty that is Microsoft's
Ribbons. If there were any scripts that relied on the traditional
menu structure of Office applications (and I'm not saying there are,
but if there were) any assumptions they could have made are well and
truly broken now.
Scott
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden