I wrote this script to resize all Applescripts to the same size, and for some reason the saved top window bounds dimension is reduced by 4 pixels, resulting in this odd exception that I have to make to the dimensions of that one window. Apply the script to a few windows to see for yourself.
Anyone have an idea as to why this is happening?
-- Resizes all open Applescripts or an entire Applescript folder based on user choice.
-- The dimensions differ because saved top window bounds are reduced by 4 pixels.
tell application "Script Editor"
set bounds of front window to {275, 46, 1000, 1050}
save front document
try
set filesFolder to button returned of (display dialog "Process open Applescripts or an entire Applescript folder?" buttons {"Files", "Folder", "Cancel"} default button 1)
if filesFolder is "Files" then
if the (count of documents) = 1 then
display dialog "There are no currently open Applescript files to process." buttons {"OK"} default button "OK"
else
repeat with i from 2 to count of documents
set bounds of window i to {275, 50, 1000, 1050}
end repeat
close (documents 2 thru -1) with saving
save document 1
end if
else if filesFolder is "Folder" then
set theFolder to choose folder with prompt "Please select a folder with Applescript files to process:"
tell application "Finder" to set theList to (files of theFolder whose kind is "Applescript") as alias list
repeat with theFile in theList
open theFile
set bounds of front window to {275, 50, 1000, 1050}
close front document with saving
end repeat
end if
end try
end tell