scripting control of items' docs windows...

[size=150]Hi,

I noticed there are few window management menus…so…I hate mousing too much around with windows :wink:

I need a script that would do the following:

when I double-click open an item’s doc named MyDoc, it will open and tile other docs windows named myDoc, commments and myDoc, quotes. So myDoc is larger and frontmost window with two smaller windows of mydoc, comments and mydoc, quotes along side.

doable??

andrew[/size]

You could move/resize windows like this:


tell application "DEVONthink Pro"
	-- left, top, width, height
	set bounds of think window 1 to {20, 20, 600, 800}
	set bounds of think window 2 to {640, 20, 600, 800}
end tell

[size=150]thanks :slight_smile: however am stuck :frowning:
cant seem to get this to work, am doing something wrong…

set wdname to (name of database 1) & "— " & "\"" & (name of child 2 of current group) & "\""
open think window wdname

how to I open a doc window of a child of a group??

andrew[/size]

See http://www.devon-technologies.com/phpBB2/viewtopic.php?t=2697

Hi,

I am geting the idea that 10.3.9 doesnt like DTpro well in scripting :wink: Had to rewrite your code some…
So anything I can do to make it better or smarter?

tell application "DEVONthink Pro"
	set chlds to children of current group
	repeat with i from 1 to 3
		set recName to item i of chlds 
		open window for record recName
		set wdname to name of think window 1 as string
		if (wdname contains "Comments") then
			set properties of think window 1 to {bounds:{562, 355, 966, 759}}
		else if (wdname contains "Quotes") then
			set properties of think window 1 to {bounds:{562, 25, 967, 425}}
		else
			set properties of think window 1 to {bounds:{4, 25, 560, 714}}
		end if
	end repeat
end tell

any way to set bounds before opening the window and how do i make a window the frontmost ready for focus.

thanks, andrew