← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #250067]: Menus in the Mac OS Menu Bar as targets

 

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

David Cortesi posted a new comment:
Doing some tests I find that the following sequence allows me to capture
a File menu and a region around it.

import time

switchApp("Python") # test app running from command line

time.sleep(5) # here prepare File menu

look_fn = SCREEN.capture('select menu pixels')

# save above file somewhere

switchApp("Python") # get back to test app

time.sleep(5) # again prepare menu

look_reg = SCREEN.selectRegion('select region around target')

# print region dimensions for reference

>From this data I can prepare a run-time script with a
region.find(pattern(file))

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