0
import os
from appscript import *


this = app(u'System Events').application_processes[param1].windows[param2].exists()
while True:
    this1 = app(u'System Events').application_processes[param1].windows[param2].count(each=k.radio_button)
    if count == (this1):
        this2 = app(u'System Events').application_processes[param1].windows[param2].radio_buttons[param3].click()
        try:
            os.makedirs(param1)
        except OSError:
                if os.path.exists(param1):
                    this3 = os.system('screencapture -C '+ param1 +'/'+ param2)
                    while True:
                        self.param2 = os.path.join(param1, 'win%s_%s_img_%s' % (param1, param2)) 
                        return param2 + 1 
                    time.sleep(delay)
                    pass
                else:
                    raise
                
        this4 = app(u'System Events').application_processes[param1].windows[param2].buttons[param3].click()
    
    else:
        continue

this part of my code got an error, i dunno what it is. someone help. Thank you

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by bettersaid
0

The error message says that the 'return' statement is outside the function.
What's with the line 17:
return param2+1

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.