1

Does anyone know a quick way that I could modify the following script (from CornDoggyRob) to automatically maximize the incoming call window and to adjust the orientation? I would love to try this with a couple people with disabilities, who are unable to physically answer/adjust the size, and I have tried a number of things, but I am afraid I am far too unfamiliar with AppleScript commands.

— Facetime Auto Answer — Copyright ©2010 CornDog Computers — twitter: @CornDoggyRob

repeat
        — Check to see if Facetime is active
        tell application "System Events" to set theCount to the count of (processes whose name is "Facetime")
        if theCount = 0 then
                do shell script "sleep 1"
        else
                tell application "FaceTime" to activate
                do shell script "sleep 2"
                tell application "FaceTime" to activate
                tell application "System Events" to tell process "FaceTime"
                        if name of front window contains "with" then
                                do shell script "sleep 5"
                        else
                                tell application "System Events" to activate application "FaceTime"
                                keystroke return
                                do shell script "sleep 5"
                                — Check to see if call is active
                                tell application "System Events" to tell process "FaceTime"
                                        if name of front window contains "with" then
                                                do shell script "sleep 5"
                                        else
                                                — Quit Facetime if call is not active
                                                tell application "FaceTime" to quit
                                                do shell script "sleep 5"
                                        end if
                                end tell
                        end if
                end tell
        end if
end repeat
end
1

It appears to be doable. From

http://www.macosxautomation.com/applescript/firsttutorial/11.html

To get the application/windows dimensions

tell application "Finder" to get the bounds of the front window
--> returns something like: {72, 90, 512, 481}

to change it

tell application "Finder" to set the bounds of the front Finder window to {24, 96, 524, 396}

and to find the dimensions of your display

tell application "Finder" to get the bounds of the window of the desktop
--> returns: {0, 0, 1920, 1200}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .