← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #205272]: Maximize the window - Mac

 

Question #205272 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/205272

RaiMan proposed the following answer:
Something like that:

def maximize_myWindow(myapp):
    h = SCREEN.h-30
    cmd = """osascript<<END
    tell application "System Events"
    tell process "%s"
    if %d > item 2 of (get size of window 1) then
    click button 2 of window 1
    endif
    end tell
    end tell
    """
    os.system( (cmd%("Safari", h) )

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.