I have a short routine that positions Safari and Excel side by side.My set up is a MacBook with two external monitors and I would like to specify which monitor the applications are positioned on but I not been able to figure it out
Also I have both Excel 2011 and 2016, for a number of reasons I need to use Excel 2011, it is already set as the default application to open Excel files. The routine below works fine if Safari and Excel are open but if they are not and I add a command to open Excel it defaults to the 2016 version.
--Application Position is Left, Top,Width,Height
tell application "Finder"
set BoundsAll to bounds of window of desktop
set WinW to item 3 of BoundsAll
set WinH to item 4 of BoundsAll
end tell
--display dialog WinW as string
tell application "Safari"
activate
end tell
tell application "Safari" to set the bounds of the front window to {0, 22, WinW / 2, WinH - 50}
tell application "Microsoft Excel"
activate
end tell
tell application "Microsoft Excel" to set the bounds of the front window to {WinW / 2, 22, WinW, WinH - 50}
Any ideas very much appreciated