Changeset 632
- Timestamp:
- 11/14/10 06:47:18 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/StreamVision/StreamVision.py
r631 r632 99 99 return False 100 100 systemEvents = app(id='com.apple.systemEvents') 101 remote_speakers = systemEvents.application_processes[u'iTunes'].windows[u'iTunes'].buttons[its.attributes['AXDescription'].value.endswith(u'remote speakers')].title() 101 iTunesWindow = systemEvents.application_processes[u'iTunes'].windows[u'iTunes'] 102 try: 103 remote_speakers = iTunesWindow.buttons[its.attributes['AXDescription'].value.endswith(u'remote speakers')].title() 104 except CommandError: 105 # with iTunes Store visible, the query fails with errAENoSuchObject 106 for button in iTunesWindow.buttons(): 107 try: 108 if button.attributes['AXDescription'].value().endswith('remote speakers'): 109 remote_speakers = [button.title()] 110 except CommandError: 111 pass 102 112 return (remote_speakers and remote_speakers[0] != k.missing_value) 103 113
Note:
See TracChangeset
for help on using the changeset viewer.