Trying to open 3 text windows vertically on a large monitor, with no
drawers. I was told that the DocD property is the property to set,
but not sure how this would be done. Getting properties doesn't show
anything for this new text window for DocD.
Any insight helpful.
Cheers
>Trying to open 3 text windows vertically on a large monitor, with no
>drawers. I was told that the DocD property is the property to set,
>but not sure how this would be done. Getting properties doesn't show
>anything for this new text window for DocD.
That's the four-character code for the property in the
terminology. In English, it's "files visible".
Enjoy,
R.
--
Rich Siegel Bare Bones Software, Inc.
<sie...@barebones.com> <http://www.barebones.com/>
Someday I'll look back on all this and laugh... until they
sedate me.
Trying to open 3 text windows vertically on a large monitor, with no drawers. I was told that the DocD property is the property to set, but not sure how this would be done. Getting properties doesn't show anything for this new text window for DocD.
On 2011-12-12, at 3:43 PM, Rich Siegel wrote:
> That's the four-character code for the property in the terminology. In English, it's "files visible".
_____________
Rich in Toronto
Yep, I'd like to have a script that creates three new text windows on my 30" monitor. Problem is, I have two 27" monitors to the left of the target monitor, and another one to the right of the target monitor, all standing vertical. So, the 30 is third in a row. I see that you measure the desktop width then divide it by three. BTW nice approach.
OK, here's what I got to help me:
try
tell application "BBEdit"
close every window
set w to 800
set s to 1
set h to 1560
set c to 5 -- a trip for troubleshooting
(* {1, 45, 800, 1560}, {801, 45, 1601, 1560}, {1602, 45, 2402, 1560} *)
if c = 1 or c = 5 then
set d1 to make new text window
set the bounds of d1 to {1, 45, w, h}
bounds of d1
end if
if c = 2 or c = 5 then
set d2 to make new text window
set the bounds of d2 to {w + s, 45, w + s + w, h}
bounds of d2
end if
if c = 3 or c = 5 then
set d3 to make new text window
set the bounds of d3 to {w + s + w + s, 45, w + s + w + s + w, h}
bounds of d3
end if
set the files visible of every window to "false"
beep
end tell
on error errMsg number errNum
set {cr, sep} to {return, "------------------------------------------"}
set e to sep & cr & "Error: " & errMsg & cr & sep & cr & "Error Number: " & errNum & cr & sep
beep
display dialog e
end try
I liked your try wrapper. I now have that kept filed away. Excuse the troubleshooting conditionals. My windows weren't rendering properly. I actually spent a long time trying to set the bounds properties only to realize it might have to bet set afterwards. Sometimes it doesn't work.
But this works. Thanks for your post. I will see if I can measure my first finder/desktop window dimensions.
_____________
Rich in Toronto
Yep, I'd like to have a script that creates three new text windows on my 30" monitor. Problem is, I have two 27" monitors to the left of the target monitor, and another one to the right of the target monitor, all standing vertical. So, the 30 is third in a row. I see that you measure the desktop width then divide it by three. BTW nice approach.
I've got third party apps to give me general x and y coordinates, then I just mess around with my scripts to make things happy.
Cheers
On 2011-12-13, at 2:32 PM, Christopher Stone wrote:
> Hey Rich,
>
> Nice setup. :)
>
> The way Applescript handles a multiscreen environment is to return the desktop-window bounds as one big space, so moving and resizing windows by position and bounds can get a little tricky - especially if your setup is prone to changes. Really kludgy on Apple's part, but it's been this way for years.
>
> Something that may be of use to you:
>
> Change screen resolution on the command line - Mac OS X Hints
> http://hints.macworld.com/article.php?story=20110830215724984
_____________
Rich in Toronto