Re: keystroke command
Re: keystroke command
- Subject: Re: keystroke command
- From: kai <email@hidden>
- Date: Mon, 29 May 2006 23:41:30 +0100
On 29 May 2006, at 22:50, Robert Poland wrote:
On 29 May 2006, at 19:57, kai wrote:
[snip]
... I have a feeling there might be a way to achieve it without
having to select any items at all.
Here is the "Finished" script, I run it with an iKey command.
[snip: main part of code]
repeat with i from 1 to number of items in theColorList
if item i of theColorList is in theChoice then set myLabelIndex
to i - 1
end repeat
if (keys pressed) contains "Option" then
tell application "Finder"
select items of the front window
end tell
end if
repeat with eachItem in (get selection)
set the label index of eachItem to myLabelIndex
end repeat
select {} -- deselect items
[snip: rest of code]
Nice script, Bob. I see what you're doing now - so you could probably
achieve something similar to the quoted extract above, without
actually selecting/deselecting:
-----------
repeat with i from 1 to count theColorList
if item i of theColorList is in theChoice then
set myLabelIndex to i - 1
exit repeat
end if
end repeat
if (keys pressed) contains "Option" then
set the label index of the front window's items to myLabelIndex
else
repeat with eachItem in (get selection)
set the label index of eachItem to myLabelIndex
end repeat
end if
-----------
---
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