Multiple Monitors - Moving application window to specific display

We are using an iSight and Filemaker Pro together with some Applescript to semi-automate a mug-shot style photo database.

Because I am using the command-line program “isightcapture” to grab the image we can’t see it until it’s in the database. To avoid this I have set a loop to open the picture in Preview, and let the user approve it before it goes in the DB. If they don’t like it, it takes another picture; repeat.

Anywho, what I really want to do is display the Preview window on the second Display in a multi-monitor situation. I cannot figure out for the life of me if this is even possible with Applescript. I don’t want to mirror the display because 1) that looks ugly and B) it may reveal data the people being photographed should not see.

Thanks in advance!

PS: I am not married to using Preview if any other app would be better.

Preview is not scriptable, so you can't set its window's bounds.

GraphicConverter is scriptable (very) so on my dual-screen setup (a 19" main, 17" secondary) this moves the frontmost window to roughly the center of my secon

d screen. You’ll have to adjust the bounds to get your picture placed where you want it. The first two are the top left corner.

tell application "GraphicConverter"
	set bounds of window 1 to {1300, 150, 2000, 600}
end tell

A handier way to discover the screen coordinates (bounds) of a window is to run this in your Script Editor with the image where you want it on the second screen:

tell application "System Events" to set visible of process "Script Editor" to false
tell application "GraphicConverter" to set wb to bounds of window 1
activate application "Script Editor"
set msg to "And the coordinates are..." & return & return
repeat with N in wb
	set msg to msg & N & space & space
end repeat
display dialog msg

If all the images are standard browsable images, there’s another approach to displaying them - use Safari

tell application "Safari" to open (choose file) -- an image file, of course.
tell application "System Events" to set frontmost of process "Safari" to true

Heh, even better, GraphicConverter has a setting to choose the default monitor on which to open pictures. I can just set it to “Screen 2” and do:

tell application "GraphicConverter" silentopen "path:to:file.jpg"


Never noticed the Screen 1, Screen 2 preference. Thanks for that!