Changeset 630
- Timestamp:
- 09/06/10 17:24:24 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Update Podcasts/update_podcasts.py
r629 r630 8 8 9 9 def iTunes_main_pane(): 10 return app(u'System Events').application_processes[u'iTunes'].windows[u'iTunes'].s plitter_groups[1].scroll_areas[1]10 return app(u'System Events').application_processes[u'iTunes'].windows[u'iTunes'].scroll_areas[1] 11 11 12 12 def wait_for_podcast_update(iTunes): … … 35 35 36 36 # wait for update to complete 37 sync_enabled = iTunes_main_pane().buttons[u'Sync'].enabled 38 while True: 39 time.sleep(0.5) 37 def sync_enabled(): 40 38 try: 41 if sync_enabled.get() == True: 42 return 39 iTunes_main_pane().buttons[u'Apply'].click() 43 40 except CommandError: 44 41 pass 42 try: 43 return iTunes_main_pane().buttons[u'Sync'].enabled.get() 44 except CommandError: 45 pass 46 47 while not sync_enabled(): 48 time.sleep(0.5) 45 49 46 50 if __name__ == '__main__':
Note:
See TracChangeset
for help on using the changeset viewer.