Changeset 648 for trunk/Update Dates
- Timestamp:
- 08/26/12 14:29:54 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Update Dates/update_dates.py
r626 r648 106 106 SA = ScriptingAddition() 107 107 SA.activate() 108 try: 109 while True: 110 result = SA.display_dialog('How many pages do you wish to scan?', 111 buttons=['Cancel', 'Scan'], 112 cancel_button=1, default_button=2, 113 default_answer='1') 114 try: 115 pages = int(result[k.text_returned]) 116 except ValueError: 117 continue 118 if pages > 0: 119 break 120 except CommandError: 121 return False 108 while True: 109 result = SA.display_dialog('How many pages do you wish to scan?', 110 buttons=['Cancel', 'Scan'], 111 cancel_button=1, default_button=2, 112 default_answer='1') 113 if result is None: 114 return False 115 try: 116 pages = int(result[k.text_returned]) 117 except ValueError: 118 continue 119 if pages > 0: 120 break 122 121 123 122 Acrobat.activate() … … 150 149 151 150 scanned_document = Acrobat.documents['%s.pdf' % filename] 152 scanned_file = scanned_document.file_alias( )151 scanned_file = scanned_document.file_alias(timeout=0) 153 152 scanned_document.close() 154 153 … … 177 176 178 177 while scan_one(): 179 pass 180 181 writePlist({'Sources': sources}, PREFERENCES_PATH) 178 writePlist({'Sources': sources}, PREFERENCES_PATH)
Note:
See TracChangeset
for help on using the changeset viewer.