• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: getting focus, slow getting icon position in window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting focus, slow getting icon position in window


  • Subject: Re: getting focus, slow getting icon position in window
  • From: OzSanta <email@hidden>
  • Date: Tue, 25 Jan 2011 10:57:57 +1100


On 25/01/2011, at 1:59 AM, Michelle Steiner wrote:

On Jan 24, 2011, at 3:17 AM, OzSanta wrote:

1. Is it possible in Applescript to determine if the desktop or a window is the Finders focus?

tell application "Finder"
activate
try
display dialog (get name of the front window)
on error
display dialog "Desktop is the focus"
end try
end tell

-- Michelle


G'day Michelle and Christopher.

The suggestion to use the 

set sel to selection as alias list
works great thanks. BIG improvement.

Unfortunately the other suggestions don't work so well.

1. If icons are selected on the desktop AND in a window at the same time, I want to know what's the focus.

2. The top code only works if no window is open.

3. If a window is open, but unselected, it still shows as the frontmost window.

4. I've already used the code...

try
set we_are_on_desktop to ((container of ThisItem as alias) is (path to desktop folder))
on error
set we_are_on_desktop to (kind of ThisItem as text = "Volume") --< only Volume icons selected
end try


to try and set if we're on the desktop. Trouble is, I had to get an item of the selection first, which took too long if the items were in a folder. Now that it's faster, situation is resolved.


Now I've just got to speed up my icon placement routine. That's another story.

Regards

Santa



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >getting focus, slow getting icon position in window (From: OzSanta <email@hidden>)
 >Re: getting focus, slow getting icon position in window (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: Is it possible to set the main edit window of Adobe Photoshop Elements
  • Next by Date: getting reference as string for rebuilding a reference
  • Previous by thread: Re: getting focus, slow getting icon position in window
  • Next by thread: A Lookup Function?
  • Index(es):
    • Date
    • Thread