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