rb-scpt 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGES +497 -0
  3. data/doc/aem-manual/01_introduction.html +60 -0
  4. data/doc/aem-manual/02_apioverview.html +107 -0
  5. data/doc/aem-manual/03_packingandunpackingdata.html +135 -0
  6. data/doc/aem-manual/04_references.html +409 -0
  7. data/doc/aem-manual/05_targetingapplications.html +164 -0
  8. data/doc/aem-manual/06_buildingandsendingevents.html +229 -0
  9. data/doc/aem-manual/07_findapp.html +63 -0
  10. data/doc/aem-manual/08_examples.html +94 -0
  11. data/doc/aem-manual/aemreferenceinheritance.gif +0 -0
  12. data/doc/aem-manual/index.html +56 -0
  13. data/doc/appscript-manual/01_introduction.html +94 -0
  14. data/doc/appscript-manual/02_aboutappscripting.html +247 -0
  15. data/doc/appscript-manual/03_quicktutorial.html +167 -0
  16. data/doc/appscript-manual/04_gettinghelp.html +188 -0
  17. data/doc/appscript-manual/05_keywordconversion.html +106 -0
  18. data/doc/appscript-manual/06_classesandenums.html +192 -0
  19. data/doc/appscript-manual/07_applicationobjects.html +211 -0
  20. data/doc/appscript-manual/08_realvsgenericreferences.html +96 -0
  21. data/doc/appscript-manual/09_referenceforms.html +241 -0
  22. data/doc/appscript-manual/10_referenceexamples.html +154 -0
  23. data/doc/appscript-manual/11_applicationcommands.html +245 -0
  24. data/doc/appscript-manual/12_commandexamples.html +138 -0
  25. data/doc/appscript-manual/13_performanceissues.html +142 -0
  26. data/doc/appscript-manual/14_notes.html +80 -0
  27. data/doc/appscript-manual/application_architecture.gif +0 -0
  28. data/doc/appscript-manual/application_architecture2.gif +0 -0
  29. data/doc/appscript-manual/finder_to_textedit_event.gif +0 -0
  30. data/doc/appscript-manual/index.html +62 -0
  31. data/doc/appscript-manual/relationships_example.gif +0 -0
  32. data/doc/appscript-manual/ruby_to_itunes_event.gif +0 -0
  33. data/doc/full.css +106 -0
  34. data/doc/index.html +45 -0
  35. data/doc/mactypes-manual/01_introduction.html +54 -0
  36. data/doc/mactypes-manual/02_aliasclass.html +124 -0
  37. data/doc/mactypes-manual/03_fileurlclass.html +126 -0
  38. data/doc/mactypes-manual/04_unitsclass.html +100 -0
  39. data/doc/mactypes-manual/index.html +53 -0
  40. data/doc/osax-manual/01_introduction.html +67 -0
  41. data/doc/osax-manual/02_interface.html +147 -0
  42. data/doc/osax-manual/03_examples.html +73 -0
  43. data/doc/osax-manual/04_notes.html +61 -0
  44. data/doc/osax-manual/index.html +53 -0
  45. data/doc/rb-appscript-logo.png +0 -0
  46. data/extconf.rb +65 -0
  47. data/rb-scpt.gemspec +14 -0
  48. data/sample/AB_export_vcard.rb +31 -0
  49. data/sample/AB_list_people_with_emails.rb +13 -0
  50. data/sample/Add_iCal_event.rb +21 -0
  51. data/sample/Create_daily_iCal_todos.rb +75 -0
  52. data/sample/Export_Address_Book_phone_numbers.rb +59 -0
  53. data/sample/Hello_world.rb +21 -0
  54. data/sample/List_iTunes_playlist_names.rb +11 -0
  55. data/sample/Make_Mail_message.rb +33 -0
  56. data/sample/Open_file_in_TextEdit.rb +13 -0
  57. data/sample/Organize_Mail_messages.rb +61 -0
  58. data/sample/Print_folder_tree.rb +16 -0
  59. data/sample/Select_all_HTML_files.rb +14 -0
  60. data/sample/Set_iChat_status.rb +24 -0
  61. data/sample/Simple_Finder_GUI_Scripting.rb +18 -0
  62. data/sample/Stagger_Finder_windows.rb +25 -0
  63. data/sample/TextEdit_demo.rb +130 -0
  64. data/sample/iTunes_top40_to_html.rb +71 -0
  65. data/src/SendThreadSafe.c +380 -0
  66. data/src/SendThreadSafe.h +139 -0
  67. data/src/lib/_aem/aemreference.rb +1022 -0
  68. data/src/lib/_aem/codecs.rb +662 -0
  69. data/src/lib/_aem/connect.rb +205 -0
  70. data/src/lib/_aem/encodingsupport.rb +77 -0
  71. data/src/lib/_aem/findapp.rb +85 -0
  72. data/src/lib/_aem/mactypes.rb +251 -0
  73. data/src/lib/_aem/send.rb +279 -0
  74. data/src/lib/_aem/typewrappers.rb +59 -0
  75. data/src/lib/_appscript/defaultterminology.rb +277 -0
  76. data/src/lib/_appscript/referencerenderer.rb +245 -0
  77. data/src/lib/_appscript/reservedkeywords.rb +116 -0
  78. data/src/lib/_appscript/safeobject.rb +249 -0
  79. data/src/lib/_appscript/terminology.rb +471 -0
  80. data/src/lib/aem.rb +253 -0
  81. data/src/lib/appscript.rb +1075 -0
  82. data/src/lib/kae.rb +1489 -0
  83. data/src/lib/osax.rb +659 -0
  84. data/src/rbae.c +979 -0
  85. data/test/README +3 -0
  86. data/test/test_aemreference.rb +118 -0
  87. data/test/test_appscriptcommands.rb +152 -0
  88. data/test/test_appscriptreference.rb +106 -0
  89. data/test/test_codecs.rb +186 -0
  90. data/test/test_findapp.rb +26 -0
  91. data/test/test_mactypes.rb +79 -0
  92. data/test/test_osax.rb +54 -0
  93. data/test/testall.sh +10 -0
  94. metadata +145 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b4fb98c4afad6b0e4630a2a9de7c23bd688eb073
4
+ data.tar.gz: facd67cfb6c423958dc63aae5c8cec0bf257bae5
5
+ SHA512:
6
+ metadata.gz: b4b9ee808ed67dff145db8904a7be04c0be1d12d00188727f4647d0d3c9f6a61acf700bdf5609b22716ac4be2db2119d3146ad9d85b2468abe7ae95495480e2f
7
+ data.tar.gz: 55a98a33faafeaac67560e5a8bdb2cbd8cbaca92ded64cd5b65cea5cf4f00bf27d6c19075b5c243365419ef997dedccf228eb5a38559c667547eacd2f9748a1d
data/CHANGES ADDED
@@ -0,0 +1,497 @@
1
+ 2015-07-14 -- 1.0.0
2
+
3
+ - Forked project from SourceForce to GitHub
4
+ - Updated `extconf.rb` to allow for use on modern OS
5
+ - Renamed project and gem, as this will __only__ be focusing on Ruby
6
+
7
+ ---
8
+
9
+ 2010-03-19 -- 0.6.1
10
+
11
+ - removed 32-bit only AE.run_application_event_loop, AE.quit_application_event_loop
12
+
13
+ - updated AE.launch_application to use LSOpenApplication
14
+
15
+ - minor documentation fixes
16
+
17
+
18
+ 2010-12-17 -- 0.6.0
19
+
20
+ - added UTF-8 Encoding support in Ruby 1.9+; added AEMCodecs::Codecs#use_ascii_8bit for optionally disabling it
21
+
22
+ - AEM::Codecs#pack now accepts Date, DateTime instances; added AEM::Codecs#use_date_time method for unpacking typeLongDateTime descriptors as DateTime instead of Time instances
23
+
24
+ - removed AE.get_app_terminology() as it relied on deprecated Carbon APIs
25
+
26
+ - added AE.copy_scripting_definition()
27
+
28
+ - the OSAX module now now uses OSACopyScriptingDefinition() to obtain scripting addition terminology, so works in both 32- and 64-bit Ruby. Note that in addition to limitations of OSACopyScriptingDefinition (e.g. aete-to-sdef conversion is not 100% reliable), the SdefParser is limited in capability (no support for xi:include, class-extension, synonym elements), but should suffice for parsing relatively simple osax dictionaries.
29
+
30
+ - modified Terminology.dump() to retrieve aete resources via 'ascrgdte' events; added OSAX.dump() method
31
+
32
+ - added workaround for transaction id bug in some versions of OS X 10.6
33
+
34
+ - renamed AEMReference::Base class to AEMReference::Query
35
+
36
+ - renamed Send::CommandError class to Send::EventError; note that AEM re-exports it as AEM::EventError and [for backwards compatibilty] AEM::CommandError
37
+
38
+
39
+ 2009-07-18 -- 0.5.3
40
+
41
+ - fixed pALL code in defaultterminology
42
+
43
+ - fixed OSAX module initialisation code (previously didn't initialise if ScriptingAddition.new was called directly)
44
+
45
+ - fixed out-of-date URLs in appscript manual
46
+
47
+
48
+ 2009-07-05 -- 0.5.2
49
+
50
+ - removed deprecated AEM::Application.is_running? method
51
+
52
+ - added #dont_cache_unpacked_specifiers, #pack_strings_as_type compatibility options to AEM::Codecs
53
+
54
+ - added default definitions for 'item' type, 'items' elements, 'properties' property as Apple have removed the 'item' class definition from skeleton.sdef (the default terminology for Cocoa apps)
55
+
56
+ - property and elements methods now raise ArgumentError if passed arguments; previously, malformed elements selectors, e.g. app('TextEdit').documents(1).text, would be silently ignored, resulting in unexpected behaviour
57
+
58
+ - Codecs#unpack now tries to coerce descriptors of typeVersion to unicode text (works on 10.4+) c.f. AppleScript (note: itunes.version.get returns the wrong version number otherwise; this appears to be an iTunes bug, but is masked by current AppleScript behaviour)
59
+
60
+ - #process_exists_for_url?, #remote_app in connect.rb now raise error if URL string doesn't contain a colon (process will crash otherwise due to an OS bug)
61
+
62
+ - improved error reporting in Reference#[] when a malformed generic reference containing a command expands to a non-reference value. e.g. its.name.get() would previously expand the the value of the object's 'name' property, typically a string, resulting in a cryptic NoMethodError; this now raises a descriptive ArgumentError.
63
+
64
+ - fixed bug where Terminology module would error on zero-length keywords in problem dictionaries (e.g. MS Word 12.1.7)
65
+
66
+ - AEM::Codecs now correctly unpacks AEDescs of typeBoolean whose data >1 byte
67
+
68
+ - fixed inconsistent escaping of application-defined property/element names that overlap built-in type/enum/property names but uses different codes. e.g. Adobe Illustrator defines 'rotation' as 'SxRx' - this overlaps built-in definition ('rotation' = 'trot'), so is escaped as 'rotation_'. Previously only the Keyword was escaped (i.e. :rotation_ but ref.rotation) now both are escaped (i.e. :rotation_, ref.rotation_). Users should update existing code as needed.
69
+
70
+ - restructured defaultterminology.rb to make it easier to maintain
71
+
72
+ - changed default terminology mapping for :data from KAE::CRawData ('rdat') to KAE::TypeData ('tdta')
73
+
74
+ - the OSAX module now obtains list of installed scripting additions on first use instead of import (the .osax scanning code uses System Events via AEM, and sending Apple events in event loop-based application before the event loop is started can disrupt the process's handling of incoming Apple events)
75
+
76
+
77
+
78
+ 2008-02-18 -- 0.5.1
79
+
80
+ - fixed bug in Appscript::Application#launch where calling it on an application specified by_pid/by_url/by_aem_app would raise error -1708
81
+
82
+ - aem by-range specifiers now accept non-reference values (these are expanded to con-based references when packed)
83
+
84
+ - fixed bug in Appscript::Reference#_send_command method's auto-reconnection code where a re-sent event that fails now raises the correct CommandError (previously re-raised the original 'invalid connection' error)
85
+
86
+ - fixed bug when packing Fixnums in 64-bit Ruby
87
+
88
+ - fixed a memory leak in AE.get_app_terminology
89
+
90
+ - fixed minor bug and improved error reporting in Appscript::Reference#[]
91
+
92
+ - removed AEMReference::PositionSpecifier's #and, #or, #not methods as these shortcuts are no longer supported
93
+
94
+ - basic Ruby 1.9 compatibility
95
+
96
+
97
+ 2007-12-18 -- 0.5.0 (beta 2)
98
+
99
+ - OSAX module no longer errors on import in 10.5 if a ScriptingAdditions folder (e.g. ~/Library/ScriptingAdditions) doesn't exist
100
+
101
+ - added Appscript::Application#is_running? method
102
+
103
+ - added hfs_path, #hfs_path methods to MacTypes::Alias, MacTypes::FileURL; existing path, #path methods now use CFURL functions to convert between POSIX paths and URLs
104
+
105
+ - aem/appscript now raises Connect::CantLaunchApplicationError instead of AE::MacOSError if unable to launch an application. Users should update existing code as necessary.
106
+
107
+ - fixed extconf.rb so that universal binaries build correctly
108
+
109
+ - built-in help system now uses ASDictionary 0.9.0+ instead of AppscriptHelpAgent. (AppscriptHelpAgent is no longer used as-of rb-appscript 0.5.0 and may be removed if previously installed.)
110
+
111
+ - #help method now writes messages to stderr instead of stdout
112
+
113
+ - Appscript::Reference#respond_to? now has identical signature to Object#respond_to? (optional second argument was previously missing)
114
+
115
+ - fixed bug in AE.convert_long_date_time_to_unix_seconds (used to unpack AEDescs of typeLongDateTime) where it would crash if passed a FixNum instead of a BigNum
116
+
117
+ - now allow methods that have been added to Object class at runtime (e.g. importing the 'pp' module adds #pretty_print and #pretty_inspect) to be invoked on Appscript::Reference and Appscript::Application instances, assuming that the reference object doesn't already have a property/element/command by the same name. In other words, instances of these classes now behave more or less the same as instances of ordinary subclasses that use bound methods rather than #method_missing to handle incoming messages. Previously, calling (e.g.) #pretty_inspect on an appscript reference would result in a 'property/element/command not found' error.
118
+
119
+ - improved behaviour of Appscript::Application#AS_new_reference when argument is nil (now returns a new reference to the root application object)
120
+
121
+ - OSAX::Application initialiser now optionally accepts static terminology 'glue' module as its second argument. This is partly to provide scripts that need to run in 64-bit processes with a workaround for accessing the OSAX module, which can't yet automatically obtain osax terminology under 64-bit (see TODO file).
122
+
123
+ - added process_exists_for_path?, process_exists_for_pid?, process_exists_for_url?, process_exists_for_desc? class methods to AEM::Application
124
+
125
+ - deprecated AEM::Application.is_running? (will be removed in 1.0.0); any existing code that uses this method should be updated to use AEM::Application.process_exists_for_path? instead
126
+
127
+ - fixed minor formatting flaw in generic references' #to_s method
128
+
129
+ - AEM::Application is now a subclass of AEMReference::Base, allowing aem Codecs instances to pack it
130
+
131
+ - added AB_export_vcard.rb sample script
132
+
133
+
134
+ 2007-08-17 -- 0.4.0 (beta 1)
135
+
136
+ - renamed the following aem/appscript methods to be consistent with AppleScript:
137
+
138
+ start -> beginning
139
+ starts_with -> begins_with
140
+ does_not_start_with -> does_not_begin_with
141
+ start_transaction -> begin_transaction
142
+
143
+ Users should update existing code as necessary.
144
+
145
+ - aem and appscript no longer accept non-test references as test clauses. Previously, a reference such as 'its.visible' would automatically be expanded to the comparison test 'its.visible.eq(true)' as a convenience. However, this shortcut didn't apply when these non-test references appeared as arguments to the #and and #or logical test methods, which meant that this shortcut behaviour was inconsistent and potentially confusing; therefore it has been removed. Users should update existing code as necessary.
146
+
147
+ - added AE::AEDesc#send_thread_safe; this is now used by AEM instead of AE::AEDesc.send to allow reply events to be received on non-main threads (note: this is a non-issue in non-threaded processes or in processes that only use Ruby 1.x's green threads within the main native thread, but as the additional overhead isn't noticeable it does no harm to make it the default behaviour anyway).
148
+
149
+ - added AE::AEDesc#flatten and AE::AEDesc.unflatten for serialising AEDescs
150
+
151
+ - added support for custom reference roots in AEM and Appscript
152
+
153
+ - AEM::Application#inspect now displays correct class name when Application class is subclassed
154
+
155
+ - Appscript::Reference#[] now accepts real references and aem specifiers as by-filter test clauses (previously only accepted GenericReference)
156
+
157
+ - added note about rubygems to appscript manual; added rubygems support to sample scripts
158
+
159
+ - aete parser no longer raises error if aete isn't fully parsed (i.e. same as AppleScript) [SI]
160
+
161
+ - added Appscript::Reference#help
162
+
163
+
164
+ 2007-04-10 -- 0.3.1
165
+
166
+ - 64-bit support in rbae.c [JB]
167
+
168
+ - Terminology.dump will use 'ascrgdte' event to obtain aetes if AE.get_app_terminology is unavailable
169
+
170
+ - added TypeUInt16, TypeUInt64 support to Codecs#unpack
171
+
172
+ - added Codecs#pack_uint16; by default, this packs numbers in range (2**63)..(2**64 - 1) as 64-bit floats (lossy), but clients could override this to pack as TypeUInt64 where supported by OS and applications
173
+
174
+ - changed timeout for ascrgdte event to 120 sec
175
+
176
+ - terminology parser no longer errors on zero-length aetes
177
+
178
+
179
+ 2007-01-18 -- 0.3.0
180
+
181
+ - removed 'AS' alias; client scripts should refer to Appscript module, e.g.:
182
+
183
+ textedit = AS.app('TextEdit')
184
+
185
+ should be changed to:
186
+
187
+ textedit = Appscript.app('TextEdit')
188
+
189
+ - added 'p' prefixes to 'pcls' and 'ID ' keys in DefaultTerminology::ReferenceByCode (minor bugfix)
190
+
191
+ - in AE::AEDesc, renamed #get to #get_item and added #get_param and #get_attr methods
192
+
193
+ - improved unpacking of object specifiers and other reference-related AEDescs (10-20% faster)
194
+
195
+ - adjusted ordering of case blocks in Codecs#pack, #unpack to improve performance when packing/unpacking more commonly used types
196
+
197
+ - added Appscript::Application#AS_new_reference; this takes a generic/aem reference and returns an appscript reference
198
+
199
+ - referencerenderer now displays accurate representation of an appscript reference when appscript-style representation is unavailable (previously rendered the appscript reference as an aem-style reference string, which was misleading)
200
+
201
+ - tweaked APIs for UnitTypeCodecs' pack/unpack procs
202
+
203
+ - moved problem apps chapter to website
204
+
205
+ - added information on osadict to getting help chapter
206
+
207
+ - renamed aem's #userproperty method to #user_property
208
+
209
+ - modified AEM_resolve to dispatch method calls via #send. Client objects should now either implement all aem reference methods OR a send(name, *args) method. Clients should avoid using method_missing as that can cause problems if client code includes methods into Object, as those injected methods may then be called instead of method_missing.
210
+
211
+ - appscript now unpacks AEAddressDescs as Appscript::Application instances (note: as with AppleScript, this behaviour is asymmetrical since application objects always pack as null descs, i.e. they're treated as references when packing)
212
+
213
+ - added Appscript::Application#by_aem_app method for converting AEM::Application instances to appscript application objects
214
+
215
+ - iTunes_top40_to_html.rb sample script now opens resulting HTML file in user's default web browser
216
+
217
+ - removed MacTypes::Units.method_missing
218
+
219
+ - Appscript::Reference and Appscript::GenericReference now inherit from SafeObject class (based on BasicObject class <http://facets.rubyforge.org>) to prevent any third-party methods added to base classes from showing up in Reference/GenericReference and interfering with method_missing's behaviour. Note that _appscript/safeobject.rb installs traps on Module#method_added and Module#included in order to detect any changes during runtime.
220
+
221
+ - added OSAX#osax and OSAX#scripting_addition to allow these methods to be included for convenience
222
+
223
+ - FindApp.by_name now always raises ApplicationNotFoundError when application not found (previously sometimes raised RuntimeError
224
+
225
+ - added more tests
226
+
227
+ - fixed bug in MacTypes::FileBase#== where comparing two Alias/FileURL objects with different paths would return true, not false, and generally improved its behaviour
228
+
229
+ - added default value ('StandardAdditions') for OSAX.osax's name argument
230
+
231
+ - added Add_iCal_event.rb, Export_Address_Book_phone_numbers.rb examples; updated Hello_World.rb example to also demonstrate OSAX usage; made Select_all_HTML_files.rb example clearer
232
+
233
+ - improved handling of synonyms in Terminology, TerminologyParser modules (definitions with same codes but different names are now retained; previously only the last-found definition was retained). Still doesn't mimic AS's behaviour 100%, but it's difficult to get any closer without studying the original AS source code.
234
+
235
+ - added Terminology.dump method; removed misc/dump.rb file
236
+
237
+
238
+ 2006-11-29 -- 0.2.1
239
+
240
+ - renamed AS module to Appscript. An 'AS' alias is temporarily provided for backwards compatibility but this will be removed in a future release. Users should update their scripts accordingly.
241
+
242
+ - _appscript/referencerenderer.rb no longer prefixes 'AS.' to reference representation strings
243
+
244
+ - added #app, #con and #its instance methods to Appscript module to allow clients to include appscript methods and classes in other modules via 'include Appscript'; updated sample scripts and documentation to show this
245
+
246
+ - OSAX.scripting_additions now returns unique sorted names
247
+
248
+ - added MacTypes::Alias.url, MacTypes::Alias#url, MacTypes::File_URL.url, MacTypes::File_URL#url methods for working with file url strings
249
+
250
+ - OSAX::ScriptingAddition#to_s and #inspect now render scripting addition's name correctly
251
+
252
+ - removed unused AE.pid_to_psn method
253
+
254
+
255
+ 2006-11-20 -- 0.2.0
256
+
257
+ - removed path expansion in FindApp#byName, MacFile::Alias#at, MacFile::FileURL#at
258
+
259
+ - changed default send flags to KAE::KAECanSwitchLayer + KAE::KAEWaitReply (same as AppleScript)
260
+
261
+ - aliased AE::MacOSError#number to #to_i; added #to_s and #inspect methods
262
+
263
+ - added #to_s and #inspect methods to AE::AEDesc
264
+
265
+ - fixed undefined variable bug in FindApp#byName when raising an ApplicationNotFoundError
266
+
267
+ - added osax module and documentation
268
+
269
+ - added event handling code to rbae.c (not yet fully tested)
270
+
271
+ - added gemspec for source-based gem
272
+
273
+ - made Reference class's AS_appdata and AS_aemreference instance variables writeable as well as readable - this'll make it easier to inject workarounds (e.g. modified pack/unpack routines) for occasional application flaws
274
+
275
+ - added sample scripts: Organize_Mail_messages.rb, Create_daily_iCal_todos.rb, Simple_Finder_GUI_Scripting.rb, Set_iChat_status.rb
276
+
277
+ - now always packs a subject attribute (KAE::TypeSubjectAttr); this is normally a null descriptor. (Note: AS includes a subject attribute for commands whose direct parameter isn't a reference, e.g. make. Photoshop CS2's make command requires either an 'at' parameter or subject attribute and throws an error if it doesn't get one. Including a subject attribute by default should hopefully prevent any complaints.) [BB]
278
+
279
+ - removed built-in :telltarget argument to simplify the API a bit. Now, if a command is called on a reference and already has a direct parameter, the reference is packed as the subject attribute instead. Also, 'telltarget' is no longer a reserved word.
280
+
281
+ - true and false are now packed as AEDescs of typeTrue and typeFalse (same as AppleScript), not typeBoolean [BB]
282
+
283
+ - when hashes containing a :class or AEType.new('pcls') key whose value is a Symbol or AEBaseType instance are packed, the resulting AEDesc is now coerced to that type (previously the class property was packed as just another key-value pair, and the result was an AEDesc of typeAERecord) [BB]
284
+
285
+ - codecs module now unpacks a record-like AEDesc with an unknown type as a hash containing an additional 'class' property that indicates the original type (i.e. same as AppleScript)
286
+
287
+ - aliased AEM::CommandError#number to #to_i
288
+
289
+ - where property and element names are the same (e.g. file, text in BBEdit), appscript now packs this as a property specifier, unless the name is 'text', in which case it's packed as an elements specifier (i.e. [hopefully] same as AppleScript)
290
+
291
+ - renamed macfile.rb/MacFile module to mactypes.rb/MacTypes
292
+
293
+ - renamed MacTypes::Alias, MacTypes::MacFileURL methods:
294
+
295
+ Alias.at -> Alias.path
296
+ FileURL.at -> FileURL.path
297
+ Alias.newDesc -> Alias.desc
298
+ FileURL.newDesc -> FileURL.desc
299
+
300
+ - renamed AS.app methods:
301
+
302
+ app#byName -> app#by_name
303
+ app#byCreator -> app#by_creator
304
+ app#byID -> app#by_id
305
+ app#byPID -> app#by_pid
306
+ app#byURL -> app#by_url
307
+
308
+ - renamed appscript reference methods:
309
+
310
+ startswith -> starts_with
311
+ endswith -> ends_with
312
+ isin -> is_in
313
+ doesnotstartwith -> does_not_start_with
314
+ doesnotendwith -> does_not_end_with
315
+ doesnotcontain -> does_not_contain
316
+ isnotin -> is_not_in
317
+
318
+ - renamed built-in appscript command parameters:
319
+
320
+ :waitreply -> :wait_reply
321
+ :resulttype -> :result_type
322
+
323
+ - renamed AEM::Application methods:
324
+
325
+ Application.newPath -> Application.by_path
326
+ Application.newURL -> Application.by_url
327
+ Application.newPID -> Application.by_pid
328
+ Application.newAEDesc -> Application.by_desc
329
+
330
+ - renamed aem reference methods:
331
+
332
+ byindex -> by_index
333
+ byname -> by_name
334
+ byid -> by_id
335
+ byrange -> by_range
336
+ byfilter -> by_filter
337
+ startswith -> starts_with
338
+ endswith -> ends_with
339
+ isin -> is_in
340
+
341
+ - renamed FindApp methods:
342
+
343
+ FindApp.byName -> FindApp.by_name
344
+ FindApp.byCreator -> FindApp.by_creator
345
+ FindApp.byID -> FindApp.by_id
346
+
347
+ - changed type names in defaultterminology.rb to be more AppleScript-like, e.g. :String -> :string, :MissingValue -> :missing_value (note that there are still a few deliberate differences, e.g. :float instead of :real)
348
+
349
+ - added month and weekday name-code definitions to defaultterminology.rb
350
+
351
+ - changed internal variable and method names to follow Ruby style guidelines
352
+
353
+ - added MacTypes::Units class
354
+
355
+ - added add_unit_types method to Codecs class, allowing additional unit type definitions to be added
356
+
357
+ - fixed appscript reference rendering bug where property/element names could get muddled (e.g. 'document' property would appear as 'documents')
358
+
359
+ - fixed wierd rendering bug where rendered references would be invisible if client script contained an 'app' method of its own (Ruby was invoking this instead of ReferenceRenderer#method_missing)
360
+
361
+ - moved findapp.rb and mactypes.rb to _aem/ (they're already re-exported by aem.rb, appscript.rb, etc. so clients don't need to require them directly)
362
+
363
+ - 'help' is now a reserved word (though is not currently implemented)
364
+
365
+ - Attempting to pack invalid UTF8 strings now raises TypeError instead of AEM::NotUTF8TextError
366
+
367
+ - changed AEM::Application#running? to AEM::Application.is_running?(path)
368
+
369
+ - added aem manual
370
+
371
+ - replaced big if...elsif... block in Codecs#pack with case block
372
+
373
+ - removed AEM::AEEventName (the 'evnt' type, cEventIdentifier, is used by OSAGetHandlerNames)
374
+
375
+ - updated kae.rb; now contains constants scraped from the following OS X 10.4u SDK frameworks:
376
+ AE.framework (all headers)
377
+ Carbon.framework (AEInteraction.h only)
378
+ OpenScripting.framework (all headers except FinderRegistry.h)
379
+
380
+ - Connect.local_app_by_pid now returns an AEDesc of typeKernelProcessID
381
+
382
+ - added basic support for equality tests and hashing to MacFile::Alias and MacFile::URL. Note that it only tests for exact data equality; two objects that identify the same filesystem object/location by different means, using paths of different case, etc. will test as false.
383
+
384
+ - adjusted packing of 'make' command so that if target reference is typeObjectSpecifier then it's packed as the subject attribute but if it's typeInsertionLoc it's packed as an 'at' parameter (this avoids a bug in Cocoa Scripting where packing an insertion location as the subject attribute results in an error when CS tries to coerce it to an object specifier)
385
+
386
+ - fixed various bugs in aem's transaction-handling code
387
+
388
+ - added #abort_transaction and added optional 'session' argument to #start_transaction in AEM::Application and AS::Application
389
+
390
+
391
+ 2006-10-23 -- 0.1.6
392
+
393
+ - improved test_aemreference.rb
394
+
395
+ - fixed bug in aemreference.rb where comparing two non-equivalent aem references could return true
396
+
397
+ - simplified four-char-code conversion routines in codecs.rb
398
+
399
+ - AS::Reference#methods now returns names of application-defined properties, elements and commands in addition to names of built-in methods [MN]
400
+
401
+ - AS::Reference#respond_to? now returns true for names of application-defined properties, elements and commands in addition to names of built-in methods [MN]
402
+
403
+ - removed rbosadict; use ASDictionary.app instead (available from <http://appscript.sourceforge.net>)
404
+
405
+ - removed AS::Application#useterminology; added optional 'terms' argument to Application constructors instead
406
+
407
+ - in Terminology module, changed timeout for ascrgdte event from 120 to 30 sec
408
+
409
+ - added dump tool + documentation
410
+
411
+ - added info to manual on scripting non-stay-open applications
412
+
413
+ - removed MacFile::Alias#newPath and MacFile::FileURL#newPath constructors (use #at instead)
414
+
415
+ - changed MacFile::Alias#to_s and MacFile::FileURL#to_s to return plain path string instead of object representation (use #inspect for that)
416
+
417
+ - removed MacFile::Alias#path and MacFile::FileURL#path (use #to_s instead)
418
+
419
+ - added macfile manual
420
+
421
+ - Connect.launch_app no longer waits for reply/error when sending a launch event to an already running application
422
+
423
+
424
+ 2006-10-18 -- 0.1.5
425
+
426
+ - renamed MacFile::Alias#newPath, MacFile::FileURL#newPath to Alias#at and FileURL#at for conciseness; e.g.: FileURL.at("/some/path"). Note: newPath methods will be removed in 0.2.0.
427
+
428
+ - appscript module now packs UInt32 csig attributes correctly [DH]
429
+
430
+ - fixed little-endian bugs when packing and unpacking typeSInt64 and typeLongDateTime
431
+
432
+ - packing and unpacking typeLongDateTime AEDescs is now about as accurate as can be expected, given the inherent problems of LongDateTime (i.e. UCConvertLongDateTimeToCFAbsoluteTime and UCConvertCFAbsoluteTimeToLongDateTime have off-by-an-hour [or whatever the local difference is] inaccuracies at ST/DST/ST boundaries)
433
+
434
+ - improved error reporting in MacFile module: creating a MacFile::Alias object with a path to a non-existent filesystem object, getting path for MacFile::Alias object that no longer identifies a valid filesystem object, etc. now raises MacFile::FileNotFoundError instead of various MacOSErrors
435
+
436
+ - comparison methods' arguments now display correctly when to_s/inspect is called on its-based references
437
+
438
+ - its-based aem references now correctly unpack KAEContains comparison descriptors as 'reference.isin(value)', rather than trying to unpack them incorrectly as 'value.contains(reference)'
439
+
440
+ - first/middle/last/any references now compare correctly with identical references that have been previously packed and unpacked. Previously the codecs module was unpacking them with different _key attributes, so equality tests would always return false even when the two references were identical.
441
+
442
+ - Attempting to pack invalid UTF8 strings now raises AEM::NotUTF8TextError rather than AE::MacOSError -1700.
443
+
444
+ - fixed launch method (was calling non-existent Connect.launch, not Connect.launchApp)
445
+
446
+ - attempting to retrieve aete resource from an application that doesn't have any terminology no longer raises 'resource not found' (-192) error
447
+
448
+ - AEM module now re-exports AE::MacOSError class for convenience
449
+
450
+ - Apple Event Manager-raised errors that occur when sending events are now reported correctly (was giving 'uninitialized constant Send::Event::None' errors)
451
+
452
+ - appscript referencerenderer module now renders class names in next and previous references correctly
453
+
454
+ - GenericReference#to_s now includes 'AS.' prefix when rendering string representations of generic references
455
+
456
+ - fixed ==() methods in appscript Reference and aem Application classes
457
+
458
+ - implemented eql? methods so aem types, aem references and appscript references should now work correctly as hash keys
459
+
460
+ - fixed endian bugs in Codecs when unpacking insertion location selectors and comparison and logic operators
461
+
462
+
463
+ 2006-10-15 -- 0.1.4
464
+
465
+ - fixed error message when reporting an unknown parameter (was showing command name, not parameter name)
466
+
467
+ - fixed bug in TextEdit_demo.rb script (count command's parameter should be :each, not :each_)
468
+
469
+ - fixed bug where typeBoolean AEDescs would always unpack as true
470
+
471
+ - fixed bugs when packing and unpacking AEDescs of typeSInt64
472
+
473
+ - integers between 2*31 and 2**63-1 now pack as typeSInt64, not typeFloat
474
+
475
+ - [mostly] fixed timezone and winter/summer time bugs; there's probably still problems at the points where DST begins and ends (some of which may be Ruby's fault; this is still to be determined)
476
+
477
+
478
+ 2006-10-13 -- 0.1.3
479
+
480
+ - fixed a bug in appscript where the first argument in a command call would be ignored if it was false or nil [MN]
481
+
482
+ - changed priority order for determining what an ambiguous keyword (e.g. :workbook in Excel) that may be either a type or enumerator name should be packed as; previously typeEnumerated was the default, now it's typeType [MN]
483
+
484
+
485
+ 2006-10-12 -- 0.1.2
486
+
487
+ - fixed a bug where appscript was unpacking typeEnumerated AEDescs as AEM::AEEnums instead of Symbols [MN]
488
+
489
+
490
+ 2006-10-10 -- 0.1.1
491
+
492
+ - made several corrections and improvements to appscript manual [MN]
493
+
494
+
495
+ 2006-10-09 -- 0.1.0
496
+
497
+ - first release