Re: Finder window help...
Re: Finder window help...
- Subject: Re: Finder window help...
- From: Mr Tea <email@hidden>
- Date: Sat, 04 Jan 2003 16:05:11 +0000
This from Domains4Days.com - dated 04-01-03 02.36 pm:
>
Back on system nine - This used to work OK. For some reason on Jaguar
>
10.2.3, the second line: "set size of container window..." does not work.
>
>
Any ideas?
>
>
tell application "Finder"
>
activate
>
open alias "main:goodstuff"
>
set position of container window of folder "goodstuff" of disk "main" to
>
{100, 50}
>
set size of container window of folder "goodstuff" of disk "main" to
>
{100, 100}
>
end tell
The size property seems to have gone AWOL in X. Perhaps it was considered
redundant, as bounds can be used to the same end. This should do what you
need:
tell application "Finder"
activate
open alias "main:goodstuff"
set bounds of container window of folder "goodstuff" of disk "main" to
{100, 50, 200, 150}
end tell
...or more compactly...
set theFolder to alias "main:goodstuff"
tell application "Finder"
activate
open theFolder
set bounds of container window of theFolder to {100, 50, 200, 150}
end tell
When an item is referred to several times in a script, it usually makes
sense to store it in a variable, which saves typing and makes subsequent
editing easier if, for example, you wish to use a similar script with a
different folder.
HTH
Mr Tea
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.