on run tell application "System Events" set pids to id of processes whose frontmost is true and name is "Google Chrome" if length of pids is 0 then return end if set pid to item 1 of pids tell process id pid tell item 1 of (windows whose subrole is "AXStandardWindow") set {{w, h}, {x, y}} to {{500, 800}, {0, 22}} set size to {w, h} set position to {x, y} end tell end tell end tell end run