Can you define a region outside of a function, then use it on that function

Asked by p

Hi still learning Sikuli and im wondering,
 Can you define a region outside of a function, then use it on that function?
i don't want to define it inside function as the region may change
EG.
r = Region(1625,158,265,336)

for n in range (10):
        r.Mails.mails()

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Karl (k-d) said :
#1

for isn't a function.

If you're using a function, you'll need the global keyword if you're changing the region.

Regions don't have Mails in them.

Can you help with this problem?

Provide an answer of your own, or ask p for more information if necessary.

To post a message you must log in.