I’ve written a script to generate job folders, and at the end of the script, it opens the newly created job folder to a specific folder so that we can copy client disks into it. For some unknown reason, (at least unknown to me!)… my x-y coordinates in the open command randomly reverse and the window that opens displays as a vertical rectangle, instead of a horizontal one. I hope that makes sense… Here’s the code of the section that opens the folder:
property x1 : 50
property y1 : 50
property xSize : 1100
property ySize : 400
on gridFolder(folder_loc, folderName, jobnumber)
tell application "Finder"
activate
try
open folder folderName of folder folder_loc
on error errmsg number errnum
if errnum ≠-128 then
beep
display dialog "Error: " & errnum & return & errmsg buttons {"OK"} with icon stop
end if
end try
try
set bounds of window of folder (folderName) of folder folder_loc to {x1, y1, x1 + xSize, y1 + ySize}
set current view of window of folder (folderName) of folder folder_loc to column view
set orig_path to (folder_loc & ":" & folderName) as string
select folder (jobnumber & "_Originals") of folder orig_path
set dFolder to list folder (orig_path & ":" & jobnumber & "_Originals")
set orig_path to (orig_path & ":" & (jobnumber & "_Originals")) as string
select folder ((last text item of dFolder) as text) of folder orig_path
end try
end tell
end gridFolder
Any suggestions would be greatly appriciated.
Thanks
Brian