• 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: Arranging a window?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Arranging a window?


  • Subject: Re: Arranging a window?
  • From: "Marc K. Myers" <email@hidden>
  • Date: Sat, 05 May 2001 03:26:59 -0400
  • Organization: [very little]

> Date: Fri, 4 May 2001 14:00:01 -0500
> To: email@hidden
> From: Steve Herman <email@hidden>
> Subject: Arranging a window?
>
> I've run into a couple of interesting problems when trying to set a
> window's view and the positions of the icons within. Basically I've got a
> "sourceFolder" on a server volume and a "targetFolder" on a local volume.
> Ultimately the sourceFolder will be arranged and maintained by an
> administrator of sorts, and the script will run to make the targetFolder
> which resides on many end-user machines look like the sourceFolder. So, I'm
> trying to sort of mirror the sourceFolder's arrangement onto the
> targetFolder.
>
> Problem 1: I open the content window of sourceFolder and get it's view, and
> I open the content window of targetFolder and set it's view to match. Now,
> if sourceFolder is in "icon" view or "small icon" view then I want to get
> the positions of all the items in the sourceFolder and if those same items
> exist in the targetFolder then set their position to match. But once I've
> got sourceFolder's view I can't figure out what to compare it to to figure
> out what it's value is. The old Finder Guide I've got says it should be a
> value between 0 and 8, but it's not. In view that's returned comes back as
> something like "icon" or "small" but they're not a strings, they appear to
> be a constants (such as <<constant ****iimg>> when in icon view, or
> <<constant ****smic>> in small icon view). So how do I compare my variable
> to a constant of this sort?

You can coerce value of the view to an integer:

set theFldr to choose folder
tell application "Finder"
open theFldr
set theView to (the view of theFldr) as integer
end tell
--> 2

Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074

[5/5/01 3:26:06 AM]


  • Prev by Date: Newbie question - creating non-blocking alerts
  • Next by Date: Re: help
  • Previous by thread: Arranging a window?
  • Next by thread: Re: Arranging a window?
  • Index(es):
    • Date
    • Thread