Re: keystroke command
Re: keystroke command
- Subject: Re: keystroke command
- From: kai <email@hidden>
- Date: Mon, 29 May 2006 19:57:36 +0100
On 29 May 2006, at 19:18, Michelle Steiner wrote:
On May 29, 2006, at 10:40 AM, Robert Poland wrote:
I have implemented Michelle's suggestion,
For me, your suggestion selects all of the DESKTOP items, even if
I do as follows;
activate application "Finder"
tell application "System Events"
tell process "Finder" to tell window 1
keystroke "a" using {command down} -- select all
end tell
end tell
It will select all in the front window; if there isn't an open
window, it will select all the desktop items.
It will also select all desktop items if a Finder window is open but
isn't frontmost (if you open a Finder window, then click on the
desktop, for example). So, as well as bringing the app to the front,
it's also worth making sure the Finder window is raised to accept the
keystroke command:
----------------
tell application "System Events" to tell process "Finder"
set frontmost to true
tell window 1 to if exists then
perform action "AXRaise"
keystroke "a" using {command down}
end if
end tell
----------------
As Bill says, though, Michelle's original suggested selection method
is preferable.
That said, Bob mentioned that his ultimate goal was to "set index
labels". If you could let us know specifically what you mean by that,
Bob, I have a feeling there might be a way to achieve it without
having to select any items at all.
---
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