Open group in its own window

I have a group at root level that I would like to be able to open in its own window with an AppleScript and then either close or hide later on. Can someone help me with a script for at least the first part (opening group in its own window)? Thanks.


tell application "DEVONthink Pro"
	set theSelection to the selection
	set theID to the id of (item 1 of theSelection)
	set theWindow to open window for record (get record with id theID)
end tell


tell application "DEVONthink Pro"
	close theWindow
end tell

Note: you’ll need to store theWindow’s definition (something like viewer window id 113093 of application “DEVONthink Pro”) (in order to be able to close that precise window no matter what happens in the interim) (if you are doing this in two different scripts). You could also close window 1 or something, which I believe is the window’s “order” (counting from front to back) but don’t quote me on that.

If you can tell me more about what you’re trying to do, I might be able to recommend a good way of going about it.

Thanks for your help. What I am trying to do is create a DTP group that I can use for short-term storage of Safari bookmarks. I have been using the Safari add-on “Concierge” which is perfect for my needs. It adds a slide-out sidebar to Safari that I can just drag a bookmark to. The downside is that it is an input manager and is broken in Safari 3.2.1. The developer has disappeared from view and I don’t think there will be any further updates.

I have found that I can do almost the same thing with DTP which I keep open all the time anyway. What I want to do is to be able to open a specific group window (which I have called “CONCIERGE”) when I need it and then hide it or close it when I don’t.

I hope this explains what I am trying to do. I am a novice AppleScript user and this is pretty complex for me. I have tried using Quickeys and even Automator but they don’t lend themselves to this particular task. This is also why I only need code for a single specific group since it is not a generalized task.