├── CD69778A-A49B-44D1-9F54-B24359DEF8B8.png ├── LICENSE ├── Oddball.png ├── README.md ├── alfred_library.applescript ├── alfred_library.scpt ├── bin ├── q_json.helper │ └── Contents │ │ ├── Frameworks │ │ └── Appscript.framework │ │ │ ├── Appscript │ │ │ ├── Headers │ │ │ ├── Resources │ │ │ └── Versions │ │ │ ├── A │ │ │ ├── Appscript │ │ │ ├── Headers │ │ │ │ ├── Appscript.h │ │ │ │ ├── appdata.h │ │ │ │ ├── application.h │ │ │ │ ├── base.h │ │ │ │ ├── bridgedata.h │ │ │ │ ├── codecs.h │ │ │ │ ├── command.h │ │ │ │ ├── constant.h │ │ │ │ ├── event.h │ │ │ │ ├── objectrenderer.h │ │ │ │ ├── parser.h │ │ │ │ ├── reference.h │ │ │ │ ├── referencerenderer.h │ │ │ │ ├── sendthreadsafe.h │ │ │ │ ├── specifier.h │ │ │ │ ├── terminology.h │ │ │ │ ├── test.h │ │ │ │ ├── types.h │ │ │ │ ├── unittype.h │ │ │ │ └── utils.h │ │ │ ├── Resources │ │ │ │ ├── BridgeSupport │ │ │ │ │ └── Appscript.bridgesupport │ │ │ │ └── Info.plist │ │ │ └── _CodeSignature │ │ │ │ └── CodeResources │ │ │ └── Current │ │ ├── Info.plist │ │ ├── MacOS │ │ └── JSON Helper │ │ ├── PkgInfo │ │ ├── Resources │ │ ├── English.lproj │ │ │ ├── InfoPlist.strings │ │ │ └── MainMenu.nib │ │ ├── JSON Helper.sdef │ │ └── json.icns │ │ └── _CodeSignature │ │ └── CodeResources └── q_notifier.helper ├── cache-notes.applescript ├── cache-notes.scpt ├── cache-update.applescript ├── cache-update.scpt ├── icon.png ├── info.plist ├── new.png ├── q_workflow.applescript ├── q_workflow.scpt └── workflow.scpt /CD69778A-A49B-44D1-9F54-B24359DEF8B8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surrealroad/alfred-notes/7257536915fcf5a9bb24ba42fe720bcc61c5cd87/CD69778A-A49B-44D1-9F54-B24359DEF8B8.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 surrealroad 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /Oddball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surrealroad/alfred-notes/7257536915fcf5a9bb24ba42fe720bcc61c5cd87/Oddball.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | alfred-notes 2 | ============ 3 | 4 | To use, just type "n note_text" into Alfred. E.g. "n something very important I will probably forget" 5 | To create a note from the clipboard, type "nclip optional_note_name" 6 | 7 | Changelog: 8 | 9 | - Tuesday, 17 September 2013 – Updated q_workflow module to latest version 10 | - Thursday, 18 April 2013 – Only first line is used as a title when using "nclip" with no arguments 11 | - Sunday, 7 April 2013 – Properly escape illegal characters in query 12 | - Friday, 5 April 2013 – Fixed an issue where a temporary file was getting written to the wrong place, sorry about that! 13 | - Thursday, 4 April 2013 – Combined into single workflow; renamed to "Notes"; fixed an issue with clip keyword; nclip now pastes - HTML if possible; workflow will notify if updates are available 14 | - Saturday, 16 March 2013 – First version 15 | 16 | Uses AppleScript implementation of the Workflow object class for Alfred 2 (https://github.com/qlassiqa/qWorkflow) 17 | -------------------------------------------------------------------------------- /alfred_library.applescript: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surrealroad/alfred-notes/7257536915fcf5a9bb24ba42fe720bcc61c5cd87/alfred_library.applescript -------------------------------------------------------------------------------- /alfred_library.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surrealroad/alfred-notes/7257536915fcf5a9bb24ba42fe720bcc61c5cd87/alfred_library.scpt -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Appscript: -------------------------------------------------------------------------------- 1 | Versions/Current/Appscript -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Headers: -------------------------------------------------------------------------------- 1 | Versions/Current/Headers -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Appscript: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surrealroad/alfred-notes/7257536915fcf5a9bb24ba42fe720bcc61c5cd87/bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Appscript -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Headers/Appscript.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Appscript.h 3 | * 4 | */ 5 | 6 | // aem 7 | #import "application.h" 8 | #import "event.h" 9 | #import "base.h" 10 | #import "codecs.h" 11 | #import "specifier.h" 12 | #import "test.h" 13 | #import "types.h" 14 | 15 | // appscript base 16 | #import "constant.h" 17 | #import "appdata.h" 18 | #import "command.h" 19 | #import "reference.h" 20 | #import "referencerenderer.h" 21 | 22 | // misc 23 | #import "sendthreadsafe.h" 24 | #import "utils.h" 25 | #import "objectrenderer.h" 26 | 27 | // appscript bridge 28 | #import "parser.h" 29 | #import "terminology.h" 30 | #import "bridgedata.h" -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Headers/appdata.h: -------------------------------------------------------------------------------- 1 | // 2 | // appdata.h 3 | // Appscript 4 | // 5 | 6 | 7 | #import "application.h" 8 | #import "codecs.h" 9 | #import "reference.h" 10 | #import "utils.h" 11 | 12 | 13 | /**********************************************************************/ 14 | // typedefs 15 | 16 | typedef enum { 17 | kASTargetCurrent = 1, 18 | kASTargetName, 19 | kASTargetBundleID, 20 | kASTargetURL, 21 | kASTargetPID, 22 | kASTargetDescriptor, 23 | } ASTargetType; 24 | 25 | 26 | /**********************************************************************/ 27 | 28 | 29 | @interface ASAppDataBase : AEMCodecs { 30 | Class aemApplicationClass; 31 | ASTargetType targetType; 32 | id targetData; 33 | AEMApplication *target; 34 | ASRelaunchMode relaunchMode; 35 | } 36 | 37 | - (id)initWithApplicationClass:(Class)appClass 38 | targetType:(ASTargetType)type 39 | targetData:(id)data; 40 | 41 | // creates AEMApplication instance for target application; used internally 42 | - (BOOL)connectWithError:(out NSError **)error; 43 | 44 | // returns AEMApplication instance for target application 45 | - (id)targetWithError:(out NSError **)error; 46 | 47 | // is target application running? 48 | - (BOOL)isRunning; 49 | 50 | // launch the target application without sending it the usual 'run' event; 51 | // equivalent to 'launch' command in AppleScript. 52 | - (BOOL)launchApplicationWithError:(out NSError **)error; 53 | 54 | // determines if an application specified by path should be relaunched if 55 | // its AEAddressDesc is no longer valid (i.e. application has quit/restarted) 56 | - (void)setRelaunchMode:(ASRelaunchMode)relaunchMode_; 57 | - (ASRelaunchMode)relaunchMode; 58 | 59 | @end 60 | 61 | 62 | /**********************************************************************/ 63 | 64 | 65 | @interface ASAppData : ASAppDataBase { 66 | Class constantClass, referenceClass; 67 | } 68 | 69 | - (id)initWithApplicationClass:(Class)appClass 70 | constantClass:(Class)constClass 71 | referenceClass:(Class)refClass 72 | targetType:(ASTargetType)type 73 | targetData:(id)data; 74 | 75 | // AEMCodecs hook allowing extra typechecking to be performed here 76 | - (id)unpackContainsCompDescriptorWithOperand1:(id)op1 operand2:(id)op2; 77 | 78 | @end 79 | 80 | -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Headers/application.h: -------------------------------------------------------------------------------- 1 | // 2 | // application.h 3 | // aem 4 | // 5 | 6 | #import "codecs.h" 7 | #import "sendthreadsafe.h" 8 | #import "event.h" 9 | #import "utils.h" 10 | #import "objectrenderer.h" 11 | 12 | 13 | /**********************************************************************/ 14 | // typedefs 15 | 16 | typedef enum { 17 | kAEMTargetCurrent = 1, 18 | kAEMTargetFileURL, 19 | kAEMTargetEppcURL, 20 | kAEMTargetPID, 21 | kAEMTargetDescriptor, 22 | } AEMTargetType; 23 | 24 | 25 | /**********************************************************************/ 26 | // Application class 27 | 28 | @interface AEMApplication : NSObject { 29 | AEMTargetType targetType; 30 | id targetData; 31 | NSAppleEventDescriptor *addressDesc; 32 | id defaultCodecs; 33 | AETransactionID transactionID; 34 | 35 | AEMCreateProcPtr createProc; 36 | AEMSendProcPtr sendProc; 37 | Class eventClass; 38 | } 39 | 40 | // Utility class methods 41 | 42 | // Find application by creator code, bundle ID and/or file name 43 | // Convenience wrapper for LSFindApplicationForInfo() 44 | 45 | + (NSURL *)findApplicationForCreator:(OSType)creator // use kLSUnknownCreator if none 46 | bundleID:(NSString *)bundleID // use nil if none 47 | name:(NSString *)name // use nil if none 48 | error:(out NSError **)error; 49 | 50 | // Find application by file name. Full path is also acceptable; .app suffix is optional. 51 | 52 | + (NSURL *)findApplicationForName:(NSString *)name error:(out NSError **)error; 53 | 54 | // Get Unix process ID of first process launched from specified application 55 | 56 | + (pid_t)findProcessIDForApplication:(NSURL *)fileURL error:(out NSError **)error; 57 | 58 | 59 | // Check if specified application is running 60 | 61 | // Does a local process launched from the specified application file exist? 62 | // e.g. [NSURL fileURLWithPath: @"/Applications/iCal.app"] 63 | // Returns false if process doesn't exist or file isn't found. 64 | 65 | +(BOOL)processExistsForFileURL:(NSURL *)fileURL; 66 | 67 | 68 | // Is there a local application process with the given Unix process id? 69 | 70 | +(BOOL)processExistsForPID:(pid_t)pid; 71 | 72 | 73 | // Does an application process specified by the given eppc:// URL exist? 74 | // e.g. [NSURL URLWithString: @"eppc://user:pass@0.0.0.1/TextEdit"] 75 | // Returns false if process doesn't exist, or if access isn't allowed. 76 | 77 | +(BOOL)processExistsForEppcURL:(NSURL *)eppcURL; 78 | 79 | 80 | // Does an application process specified by the given AEAddressDesc exist? 81 | // Returns false if process doesn't exist, or if access isn't allowed. 82 | 83 | +(BOOL)processExistsForDescriptor:(NSAppleEventDescriptor *)desc; 84 | 85 | 86 | 87 | 88 | // Launch an application 89 | 90 | + (pid_t)launchApplication:(NSURL *)fileURL 91 | event:(NSAppleEventDescriptor *)firstEvent 92 | flags:(LSLaunchFlags)launchFlags 93 | error:(out NSError **)error; 94 | 95 | // convenience shortcuts for the above 96 | 97 | + (pid_t)launchApplication:(NSURL *)appFileURL error:(out NSError **)error; 98 | 99 | + (pid_t)runApplication:(NSURL *)appFileURL error:(out NSError **)error; 100 | 101 | + (pid_t)openDocuments:(id)files inApplication:(NSURL *)appFileURL error:(out NSError **)error; 102 | 103 | /* 104 | * make AEAddressDescs 105 | * 106 | * Note: addressDescForLocalApplication:error: will start application if not already running 107 | */ 108 | 109 | + (NSAppleEventDescriptor *)addressDescForLocalApplication:(NSURL *)fileURL error:(out NSError **)error; 110 | 111 | + (NSAppleEventDescriptor *)addressDescForLocalProcess:(pid_t)pid; 112 | 113 | + (NSAppleEventDescriptor *)addressDescForRemoteProcess:(NSURL *)eppcURL; 114 | 115 | + (NSAppleEventDescriptor *)addressDescForCurrentProcess; 116 | 117 | 118 | /*******/ 119 | 120 | // designated initialiser; clients shouldn't call this directly but use one of the following methods 121 | 122 | - (id)initWithTargetType:(AEMTargetType)targetType_ data:(id)targetData_ error:(out NSError **)error; 123 | 124 | 125 | /* 126 | * clients should call one of the following methods to initialize AEMApplication object 127 | * 128 | * Note: if an error occurs when finding/launching an application by name/bundle ID/file URL, additional 129 | * error information may be returned via the error argument. 130 | */ 131 | 132 | - (id)initWithName:(NSString *)name error:(out NSError **)error; 133 | 134 | - (id)initWithBundleID:(NSString *)bundleID error:(out NSError **)error; 135 | 136 | - (id)initWithURL:(NSURL *)url error:(out NSError **)error; 137 | 138 | - (id)initWithPID:(pid_t)pid; 139 | 140 | - (id)initWithDescriptor:(NSAppleEventDescriptor *)desc; 141 | 142 | // shortcuts for above 143 | 144 | - (id)initWithName:(NSString *)name; 145 | 146 | - (id)initWithBundleID:(NSString *)bundleID; 147 | 148 | - (id)initWithURL:(NSURL *)url; 149 | 150 | // comparison, hash support 151 | 152 | - (BOOL)isEqual:(id)object; 153 | 154 | - (AEMTargetType)targetType; // used by -isEqual: 155 | 156 | - (id)targetData; // used by -isEqual: 157 | 158 | 159 | // clients can call following methods to modify standard create/send behaviours 160 | 161 | - (void)setCreateProc:(AEMCreateProcPtr)createProc_; 162 | 163 | - (void)setSendProc:(AEMSendProcPtr)sendProc_; 164 | 165 | - (void)setEventClass:(Class)eventClass_; 166 | 167 | 168 | // create new AEMEvent object 169 | 170 | - (id)eventWithEventClass:(AEEventClass)classCode 171 | eventID:(AEEventID)code 172 | returnID:(AEReturnID)returnID 173 | codecs:(id)codecs; 174 | 175 | - (id)eventWithEventClass:(AEEventClass)classCode 176 | eventID:(AEEventID)code 177 | returnID:(AEReturnID)returnID; 178 | 179 | - (id)eventWithEventClass:(AEEventClass)classCode 180 | eventID:(AEEventID)code 181 | codecs:(id)codecs; 182 | 183 | - (id)eventWithEventClass:(AEEventClass)classCode 184 | eventID:(AEEventID)code; 185 | 186 | 187 | // reconnect to a local application originally specified by name, bundle ID or file URL 188 | 189 | - (BOOL)reconnect; 190 | 191 | - (BOOL)reconnectWithError:(out NSError **)error; 192 | 193 | 194 | // transaction support 195 | 196 | - (BOOL)beginTransactionWithError:(out NSError **)error; 197 | 198 | - (BOOL)beginTransactionWithSession:(id)session error:(out NSError **)error; 199 | 200 | - (BOOL)endTransactionWithError:(out NSError **)error; 201 | 202 | - (BOOL)abortTransactionWithError:(out NSError **)error; 203 | 204 | 205 | 206 | @end 207 | 208 | -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Headers/base.h: -------------------------------------------------------------------------------- 1 | // 2 | // base.h 3 | // aem 4 | // 5 | 6 | #import "utils.h" 7 | 8 | 9 | /**********************************************************************/ 10 | // AEM reference base (shared by specifiers and tests) 11 | 12 | @interface AEMQuery : NSObject { 13 | NSAppleEventDescriptor *cachedDesc; 14 | unsigned cachedHash; 15 | } 16 | 17 | // set cached descriptor; performance optimisation, used internally by AEMCodecs 18 | - (void)setCachedDesc:(NSAppleEventDescriptor *)desc; 19 | 20 | // walk reference 21 | - (id)resolveWithObject:(id)object; 22 | 23 | // pack reference 24 | - (NSAppleEventDescriptor *)packWithCodecsNoCache:(id)codecs; 25 | 26 | // pack reference, caching result for efficiency 27 | - (NSAppleEventDescriptor *)packWithCodecs:(id)codecs; 28 | 29 | @end 30 | 31 | 32 | /**********************************************************************/ 33 | 34 | /* 35 | * Base class for objects to be passed to -[AEMQuery resolveWithObject:] 36 | * Each method simply returns self; subclasses can override some or all of 37 | * these methods as needed. 38 | */ 39 | @interface AEMResolver : NSObject 40 | 41 | - (id)property:(OSType)code; 42 | - (id)elements:(OSType)code; 43 | 44 | - (id)first; 45 | - (id)middle; 46 | - (id)last; 47 | - (id)any; 48 | 49 | - (id)byIndex:(id)index; 50 | - (id)byName:(id)name; 51 | - (id)byID:(id)id_; 52 | 53 | - (id)previous:(OSType)class_; 54 | - (id)next:(OSType)class_; 55 | 56 | - (id)byRange:(id)fromObject to:(id)toObject; 57 | - (id)byTest:(id)testReference; 58 | 59 | - (id)beginning; 60 | - (id)end; 61 | - (id)before; 62 | - (id)after; 63 | 64 | - (id)greaterThan:(id)object; 65 | - (id)greaterOrEquals:(id)object; 66 | - (id)equals:(id)object; 67 | - (id)notEquals:(id)object; 68 | - (id)lessThan:(id)object; 69 | - (id)lessOrEquals:(id)object; 70 | - (id)beginsWith:(id)object; 71 | - (id)endsWith:(id)object; 72 | - (id)contains:(id)object; 73 | - (id)isIn:(id)object; 74 | - (id)AND:(id)remainingOperands; 75 | - (id)OR:(id)remainingOperands; 76 | - (id)NOT; 77 | 78 | - (id)app; 79 | - (id)con; 80 | - (id)its; 81 | - (id)customRoot:(id)rootObject; 82 | 83 | @end 84 | 85 | -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Headers/bridgedata.h: -------------------------------------------------------------------------------- 1 | // 2 | // bridgedata.h 3 | // Appscript 4 | // 5 | 6 | #import "appdata.h" 7 | #import "parser.h" 8 | #import "terminology.h" 9 | #import "utils.h" 10 | 11 | @interface ASBridgeData : ASAppDataBase { 12 | id terms; 13 | ASTerminology *defaultTerms; 14 | id converter; 15 | } 16 | 17 | - (id)initWithApplicationClass:(Class)appClass 18 | targetType:(ASTargetType)type 19 | targetData:(id)data 20 | terminology:(id)terms_ 21 | defaultTerms:(ASTerminology *)defaultTerms_ 22 | keywordConverter:(id)converter_; 23 | 24 | - (ASTargetType)targetType; 25 | 26 | - (id)targetData; 27 | 28 | - (ASTerminology *)terminology; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Headers/codecs.h: -------------------------------------------------------------------------------- 1 | // 2 | // codecs.h 3 | // aem 4 | // 5 | 6 | #import "unittype.h" 7 | #import "specifier.h" 8 | #import "types.h" 9 | #import "utils.h" 10 | 11 | 12 | /**********************************************************************/ 13 | // AE types not defined in older OS versions 14 | 15 | enum { 16 | AS_typeUTF16ExternalRepresentation = 'ut16', 17 | AS_typeUInt16 = 'ushr', 18 | AS_typeUInt64 = 'ucom' 19 | }; 20 | 21 | 22 | /**********************************************************************/ 23 | 24 | 25 | @interface AEMCodecs : NSObject { 26 | id applicationRootDescriptor; 27 | BOOL disableCache, disableUnicode, allowUInt64; 28 | DescType textType; 29 | NSMutableDictionary *unitTypeDefinitionByName, *unitTypeDefinitionByCode; 30 | } 31 | 32 | + (id)defaultCodecs; 33 | 34 | 35 | /**********************************************************************/ 36 | // compatibility options 37 | 38 | /* 39 | * Some applications may define custom unit types in addition to those 40 | * normally recognised by AppleScript/appscript. Clients can add 41 | * definitions for these types to an AEMCodecs object so that these 42 | * types can be packed and unpacked automatically. 43 | */ 44 | - (void)addUnitTypeDefinition:(AEMUnitTypeDefinition *)definition; 45 | 46 | /* 47 | * When unpacking object specifiers, unlike AppleScript, appscript caches 48 | * the original AEDesc for efficiency, allowing the resulting AEMQuery to 49 | * be re-packed much more quickly. Occasionally this causes compatibility 50 | * problems with applications that returned subtly malformed specifiers. 51 | * To force an AEMCodecs object to fully unpack and repack object specifiers, 52 | * call its -dontCacheUnpackedSpecifiers method. 53 | */ 54 | - (void)dontCacheUnpackedSpecifiers; 55 | 56 | /* 57 | * Some older (pre-OS X) applications may require text to be passed as 58 | * typeChar or typeIntlText rather than the usual typeUnicodeText. To force 59 | * an AEMCodecs object to pack strings as one of these older types, call 60 | * its -packStringsAsType: method, specifying the type you want used instead. 61 | */ 62 | - (void)packStringsAsType:(DescType)type; 63 | 64 | /* 65 | * For compatibility's sake, appscript packs integers between 2^62 and 2^63-1 as 66 | * doubles, with some potential loss of precision. Mac OS X 10.5 adds typeUInt64; 67 | * to use this, call -allowUInt64. 68 | */ 69 | - (void)allowUInt64; 70 | 71 | 72 | /**********************************************************************/ 73 | // main pack methods 74 | 75 | /* 76 | * Converts a Cocoa object to an NSAppleEventDescriptor. 77 | * Calls -packUnknown: if object is of an unsupported class. 78 | */ 79 | - (NSAppleEventDescriptor *)pack:(id)anObject; 80 | 81 | /* 82 | * Called by -pack: to process a Cocoa object of unsupported class. 83 | * Default implementation raises "CodecsError" NSException; subclasses 84 | * can override this method to provide alternative behaviours if desired. 85 | */ 86 | - (NSAppleEventDescriptor *)packUnknown:(id)anObject; 87 | 88 | 89 | /**********************************************************************/ 90 | /* 91 | * The following methods will be called by -pack: as needed. 92 | * Subclasses can override the following methods to provide alternative 93 | * behaviours if desired, although this is generally unnecessary. 94 | */ 95 | - (NSAppleEventDescriptor *)packArray:(NSArray *)anObject; 96 | - (NSAppleEventDescriptor *)packDictionary:(NSDictionary *)anObject; 97 | 98 | - (void)setApplicationRootDescriptor:(NSAppleEventDescriptor *)desc; 99 | - (NSAppleEventDescriptor *)applicationRootDescriptor; 100 | 101 | 102 | /**********************************************************************/ 103 | // main unpack methods; subclasses can override to process still-unconverted objects 104 | 105 | /* 106 | * Converts an NSAppleEventDescriptor to a Cocoa object. 107 | * Calls -unpackUnknown: if descriptor is of an unsupported type. 108 | */ 109 | - (id)unpack:(NSAppleEventDescriptor *)desc; 110 | 111 | /* 112 | * Called by -unpack: to process an NSAppleEventDescriptor of unsupported type. 113 | * Default implementation checks to see if the descriptor is a record-type structure 114 | * and unpacks it as an NSDictionary if it is, otherwise it returns the value as-is. 115 | * Subclasses can override this method to provide alternative behaviours if desired. 116 | */ 117 | - (id)unpackUnknown:(NSAppleEventDescriptor *)desc; 118 | 119 | 120 | /**********************************************************************/ 121 | /* 122 | * The following methods will be called by -unpack: as needed. 123 | * Subclasses can override the following methods to provide alternative 124 | * behaviours if desired, although this is generally unnecessary. 125 | */ 126 | - (id)unpackAEList:(NSAppleEventDescriptor *)desc; 127 | - (id)unpackAERecord:(NSAppleEventDescriptor *)desc; 128 | - (id)unpackAERecordKey:(AEKeyword)key; 129 | 130 | - (id)unpackType:(NSAppleEventDescriptor *)desc; 131 | - (id)unpackEnum:(NSAppleEventDescriptor *)desc; 132 | - (id)unpackProperty:(NSAppleEventDescriptor *)desc; 133 | - (id)unpackKeyword:(NSAppleEventDescriptor *)desc; 134 | 135 | - (id)fullyUnpackObjectSpecifier:(NSAppleEventDescriptor *)desc; 136 | - (id)unpackObjectSpecifier:(NSAppleEventDescriptor *)desc; 137 | - (id)unpackInsertionLoc:(NSAppleEventDescriptor *)desc; 138 | 139 | - (id)app; 140 | - (id)con; 141 | - (id)its; 142 | - (id)customRoot:(NSAppleEventDescriptor *)desc; 143 | 144 | - (id)unpackCompDescriptor:(NSAppleEventDescriptor *)desc; 145 | - (id)unpackLogicalDescriptor:(NSAppleEventDescriptor *)desc; 146 | 147 | /* 148 | * Notes: 149 | * 150 | * kAEContains is also used to construct 'is in' tests, where test value is first operand and 151 | * reference being tested is second operand, so need to make sure first operand is an its-based ref; 152 | * if not, rearrange accordingly. 153 | * 154 | * Since type-checking is involved, this extra hook is provided so that appscript's ASAppData class 155 | * can override this method to add its own type checking. 156 | */ 157 | - (id)unpackContainsCompDescriptorWithOperand1:(id)op1 operand2:(id)op2; 158 | 159 | 160 | /**********************************************************************/ 161 | /* 162 | * The following methods are not called by -unpack:, but are provided for benefit of 163 | * subclasses that may wish to use them. 164 | */ 165 | 166 | - (NSString *)unpackApplicationBundleID:(NSAppleEventDescriptor *)desc; 167 | 168 | - (NSURL *)unpackApplicationURL:(NSAppleEventDescriptor *)desc; 169 | 170 | - (OSType)unpackApplicationSignature:(NSAppleEventDescriptor *)desc; 171 | 172 | - (pid_t)unpackProcessID:(NSAppleEventDescriptor *)desc; 173 | 174 | - (pid_t)unpackProcessSerialNumber:(NSAppleEventDescriptor *)desc; 175 | 176 | @end 177 | -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Headers/command.h: -------------------------------------------------------------------------------- 1 | // 2 | // command.h 3 | // Appscript 4 | // 5 | 6 | #import "event.h" 7 | #import "constant.h" 8 | #import "appdata.h" 9 | #import "utils.h" 10 | 11 | 12 | // used internally 13 | #define kASNoDirectParameter ((void *)-1) 14 | 15 | 16 | /**********************************************************************/ 17 | // Command base 18 | 19 | @interface ASCommand : NSObject { 20 | AEMEvent *AS_event; 21 | AESendMode sendMode; 22 | long timeout; 23 | UInt32 considsAndIgnoresFlags; 24 | NSError *targetError; 25 | } 26 | 27 | + (id)commandWithAppData:(id)appData 28 | eventClass:(AEEventClass)classCode 29 | eventID:(AEEventID)code 30 | directParameter:(id)directParameter 31 | parentReference:(id)parentReference; 32 | 33 | - (id)initWithAppData:(id)appData 34 | eventClass:(AEEventClass)classCode 35 | eventID:(AEEventID)code 36 | directParameter:(id)directParameter 37 | parentReference:(id)parentReference; 38 | 39 | // get underlying AEMEvent instance 40 | 41 | - (AEMEvent *)AS_aemEvent; 42 | 43 | // set attributes 44 | 45 | /* 46 | * Set considering/ignoring attributes. 47 | * 48 | * kAECaseConsiderMask = 0x00000001 49 | * kAEDiacriticConsiderMask = 0x00000002 50 | * kAEWhiteSpaceConsiderMask = 0x00000004 51 | * kAEHyphensConsiderMask = 0x00000008 52 | * kAEExpansionConsiderMask = 0x00000010 53 | * kAEPunctuationConsiderMask = 0x00000020 54 | * kASNumericStringsConsiderMask = 0x00000080 55 | * 56 | * kAECaseIgnoreMask = 0x00010000 57 | * kAEDiacriticIgnoreMask = 0x00020000 58 | * kAEWhiteSpaceIgnoreMask = 0x00040000 59 | * kAEHyphensIgnoreMask = 0x00080000 60 | * kAEExpansionIgnoreMask = 0x00100000 61 | * kAEPunctuationIgnoreMask = 0x00200000 62 | * kASNumericStringsIgnoreMask = 0x00800000 63 | */ 64 | - (id)considering:(UInt32)consideringFlags_; 65 | 66 | /* Set send mode flags. 67 | * kAENoReply = 0x00000001, 68 | * kAEQueueReply = 0x00000002, 69 | * kAEWaitReply = 0x00000003, 70 | * kAEDontReconnect = 0x00000080, 71 | * kAEWantReceipt = 0x00000200, 72 | * kAENeverInteract = 0x00000010, 73 | * kAECanInteract = 0x00000020, 74 | * kAEAlwaysInteract = 0x00000030, 75 | * kAECanSwitchLayer = 0x00000040, 76 | * kAEDontRecord = 0x00001000, 77 | * kAEDontExecute = 0x00002000, 78 | * kAEProcessNonReplyEvents = 0x00008000 79 | * 80 | * Default is kAEWaitReply | kAECanSwitchLayer 81 | */ 82 | - (id)sendMode:(AESendMode)flags; 83 | 84 | /* 85 | * Shortcut for setting kAEWaitReply send mode flag: 86 | */ 87 | - (id)waitForReply; 88 | 89 | /* 90 | * Shortcut for setting kAENoReply send mode flag: 91 | */ 92 | - (id)ignoreReply; 93 | 94 | /* 95 | * Shortcut for setting kAEQueueReply send mode flag: 96 | */ 97 | - (id)queueReply; 98 | 99 | /* 100 | * Specify timeout in seconds (or kAEDefaultTimeout/kAENoTimeOut). 101 | * 102 | * Default is kAEDefaultTimeout (2 minutes) 103 | */ 104 | - (id)timeout:(long)timeout_; 105 | 106 | /* 107 | * Specify the desired type for the return value. Where the application's event 108 | * handler supports this, it will attempt to coerce the event's result to this 109 | * type before returning it. May be a standard AE type (e.g. [ASConstant alias]) 110 | * or, occasionally, an application-defined type. 111 | * 112 | * Note that most applications don't support this, and those that do usually 113 | * only support it for 'get' events (e.g. Finder). 114 | */ 115 | - (id)requestedClass:(ASConstant *)classConstant; 116 | - (id)requestedType:(DescType)type; 117 | 118 | /* 119 | * Specify the AE type that the returned AEDesc must be coerced to before unpacking. 120 | * Whereas the -requestedType: method adds a kAERequestedType parameter to the outgoing 121 | * event, this coercion is performed locally by the -sendWithError: method using a 122 | * built-in or user-installed AE coercion handler if one is available. Note that if 123 | * the coercion fails, -sendWithError: will return nil and the associated NSError's 124 | * error code will be -1700 (errAECoercionFail). 125 | * 126 | * If the specified type is typeWildCard (the default), no coercion is performed. 127 | */ 128 | - (id)returnClass:(ASConstant *)classConstant; 129 | - (id)returnType:(DescType)type; 130 | 131 | /* 132 | * Shortcut for [cmd returnType: typeAEList]. 133 | */ 134 | - (id)returnList; 135 | 136 | /* 137 | * Similar to -returnType:, except that the returned AEDesc is first coerced to 138 | * to typeAEList; each list item is then coerced to the specified type. 139 | */ 140 | - (id)returnListOfClass:(ASConstant *)classConstant; 141 | - (id)returnListOfType:(DescType)type; 142 | 143 | /* 144 | * Invoke -returnDescriptor to have -sendWithError: return the returned AEDesc as 145 | * an NSAppleEventDescriptor without unpacking it. 146 | * 147 | */ 148 | - (id)returnDescriptor; 149 | 150 | // send events 151 | 152 | 153 | /* 154 | * Send the event. 155 | * 156 | * error 157 | * On return, an NSError object that describes an Apple Event Manager or application 158 | * error if one has occurred, otherwise nil. Pass nil if not required. 159 | * 160 | * Return value 161 | * 162 | * The value returned by the application, or an NSNull instance if no value was returned, 163 | * or nil if an error occurred. 164 | * 165 | * Notes 166 | * 167 | * A single event can be sent more than once if desired. 168 | */ 169 | - (id)sendWithError:(out NSError **)error; 170 | 171 | /* 172 | * Send the event with minimal error reporting. 173 | * 174 | * Return value 175 | * 176 | * The value returned by the application, or an NSNull instance if no value was returned, 177 | * or nil if an error occurred. 178 | * 179 | * Notes 180 | * 181 | * Convenience method; [evt send] is equivalent to [evt sendWithError: nil] 182 | */ 183 | - (id)send; 184 | 185 | 186 | // display formatting; subclasses will override these 187 | 188 | - (NSString *)AS_commandName; 189 | - (NSString *)AS_parameterNameForCode:(DescType)code; 190 | - (NSString *)AS_formatObject:(id)obj appData:(id)appData; 191 | 192 | @end 193 | 194 | 195 | /**********************************************************************/ 196 | 197 | 198 | @interface ASGetSetItemCommand : ASCommand 199 | @end 200 | 201 | -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Headers/constant.h: -------------------------------------------------------------------------------- 1 | // 2 | // constant.h 3 | // appscript 4 | // 5 | 6 | #import "utils.h" 7 | 8 | /**********************************************************************/ 9 | // base class for application-specific constants 10 | 11 | @interface ASConstant : NSObject { 12 | NSString *name; 13 | NSAppleEventDescriptor *desc; 14 | } 15 | 16 | + (id)constantWithName:(NSString *)name_ type:(DescType)type_ code:(OSType)code_ NS_RETURNS_RETAINED; 17 | + (id)constantWithCode:(OSType)code_; 18 | 19 | - (id)initWithName: (NSString *)name_ descriptor:(NSAppleEventDescriptor *)desc_; 20 | 21 | - (NSString *)AS_name; 22 | - (OSType)AS_code; 23 | 24 | - (NSAppleEventDescriptor *)AS_packSelf:(id)codecs; 25 | 26 | 27 | /***********************************/ 28 | // Apple Event Manager-defined types and enumerators 29 | 30 | /* Enumerators */ 31 | 32 | + (ASConstant *)applicationResponses; 33 | + (ASConstant *)ask; 34 | + (ASConstant *)case_; 35 | + (ASConstant *)diacriticals; 36 | + (ASConstant *)expansion; 37 | + (ASConstant *)hyphens; 38 | + (ASConstant *)no; 39 | + (ASConstant *)numericStrings; 40 | + (ASConstant *)punctuation; 41 | + (ASConstant *)whitespace; 42 | + (ASConstant *)yes; 43 | 44 | /* Types and properties */ 45 | 46 | + (ASConstant *)April; 47 | + (ASConstant *)August; 48 | + (ASConstant *)December; 49 | + (ASConstant *)EPSPicture; 50 | + (ASConstant *)February; 51 | + (ASConstant *)Friday; 52 | + (ASConstant *)GIFPicture; 53 | + (ASConstant *)JPEGPicture; 54 | + (ASConstant *)January; 55 | + (ASConstant *)July; 56 | + (ASConstant *)June; 57 | + (ASConstant *)March; 58 | + (ASConstant *)May; 59 | + (ASConstant *)Monday; 60 | + (ASConstant *)November; 61 | + (ASConstant *)October; 62 | + (ASConstant *)PICTPicture; 63 | + (ASConstant *)RGB16Color; 64 | + (ASConstant *)RGB96Color; 65 | + (ASConstant *)RGBColor; 66 | + (ASConstant *)Saturday; 67 | + (ASConstant *)September; 68 | + (ASConstant *)Sunday; 69 | + (ASConstant *)TIFFPicture; 70 | + (ASConstant *)Thursday; 71 | + (ASConstant *)Tuesday; 72 | + (ASConstant *)Wednesday; 73 | + (ASConstant *)alias; 74 | + (ASConstant *)anything; 75 | + (ASConstant *)applicationBundleID; 76 | + (ASConstant *)applicationSignature; 77 | + (ASConstant *)applicationURL; 78 | + (ASConstant *)best; 79 | + (ASConstant *)boolean; 80 | + (ASConstant *)boundingRectangle; 81 | + (ASConstant *)centimeters; 82 | + (ASConstant *)class_; 83 | + (ASConstant *)classInfo; 84 | + (ASConstant *)colorTable; 85 | + (ASConstant *)cubicCentimeters; 86 | + (ASConstant *)cubicFeet; 87 | + (ASConstant *)cubicInches; 88 | + (ASConstant *)cubicMeters; 89 | + (ASConstant *)cubicYards; 90 | + (ASConstant *)dashStyle; 91 | + (ASConstant *)data; 92 | + (ASConstant *)date; 93 | + (ASConstant *)decimalStruct; 94 | + (ASConstant *)degreesCelsius; 95 | + (ASConstant *)degreesFahrenheit; 96 | + (ASConstant *)degreesKelvin; 97 | + (ASConstant *)doubleInteger; 98 | + (ASConstant *)elementInfo; 99 | + (ASConstant *)encodedString; 100 | + (ASConstant *)enumerator; 101 | + (ASConstant *)eventInfo; 102 | + (ASConstant *)extendedFloat; 103 | + (ASConstant *)feet; 104 | + (ASConstant *)fileRef; 105 | + (ASConstant *)fileSpecification; 106 | + (ASConstant *)fileURL; 107 | + (ASConstant *)fixed; 108 | + (ASConstant *)fixedPoint; 109 | + (ASConstant *)fixedRectangle; 110 | + (ASConstant *)float_; 111 | + (ASConstant *)float128bit; 112 | + (ASConstant *)gallons; 113 | + (ASConstant *)grams; 114 | + (ASConstant *)graphicText; 115 | + (ASConstant *)inches; 116 | + (ASConstant *)integer; 117 | + (ASConstant *)internationalText; 118 | + (ASConstant *)internationalWritingCode; 119 | + (ASConstant *)kernelProcessID; 120 | + (ASConstant *)kilograms; 121 | + (ASConstant *)kilometers; 122 | + (ASConstant *)list; 123 | + (ASConstant *)liters; 124 | + (ASConstant *)locationReference; 125 | + (ASConstant *)longFixed; 126 | + (ASConstant *)longFixedPoint; 127 | + (ASConstant *)longFixedRectangle; 128 | + (ASConstant *)longPoint; 129 | + (ASConstant *)longRectangle; 130 | + (ASConstant *)machPort; 131 | + (ASConstant *)machine; 132 | + (ASConstant *)machineLocation; 133 | + (ASConstant *)meters; 134 | + (ASConstant *)miles; 135 | + (ASConstant *)missingValue; 136 | + (ASConstant *)null; 137 | + (ASConstant *)ounces; 138 | + (ASConstant *)parameterInfo; 139 | + (ASConstant *)pixelMapRecord; 140 | + (ASConstant *)point; 141 | + (ASConstant *)pounds; 142 | + (ASConstant *)processSerialNumber; 143 | + (ASConstant *)property; 144 | + (ASConstant *)propertyInfo; 145 | + (ASConstant *)quarts; 146 | + (ASConstant *)record; 147 | + (ASConstant *)reference; 148 | + (ASConstant *)rotation; 149 | + (ASConstant *)script; 150 | + (ASConstant *)shortFloat; 151 | + (ASConstant *)shortInteger; 152 | + (ASConstant *)squareFeet; 153 | + (ASConstant *)squareKilometers; 154 | + (ASConstant *)squareMeters; 155 | + (ASConstant *)squareMiles; 156 | + (ASConstant *)squareYards; 157 | + (ASConstant *)string; 158 | + (ASConstant *)styledClipboardText; 159 | + (ASConstant *)styledText; 160 | + (ASConstant *)suiteInfo; 161 | + (ASConstant *)textStyleInfo; 162 | + (ASConstant *)typeClass; 163 | + (ASConstant *)unicodeText; 164 | + (ASConstant *)unsignedInteger; 165 | + (ASConstant *)utf16Text; 166 | + (ASConstant *)utf8Text; 167 | + (ASConstant *)version; 168 | + (ASConstant *)writingCode; 169 | + (ASConstant *)yards; 170 | 171 | @end 172 | 173 | -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Headers/event.h: -------------------------------------------------------------------------------- 1 | // 2 | // event.h 3 | // aem 4 | // 5 | 6 | #import "codecs.h" 7 | #import "sendthreadsafe.h" 8 | #import "utils.h" 9 | #import "objectrenderer.h" 10 | 11 | 12 | /**********************************************************************/ 13 | // NSError constants 14 | 15 | extern NSString *const kASErrorDomain; // @"net.sourceforge.appscript.objc-appscript.ErrorDomain"; domain name for NSErrors returned by appscript 16 | 17 | /* 18 | * -sendWithError: will return an NSError containing error code, localized description, and a userInfo dictionary 19 | * containing kASErrorNumberKey (this has the same value as -[NSError code]) and zero or more other keys: 20 | */ 21 | 22 | extern NSString *const kASErrorNumberKey; // @"ErrorNumber"; error number returned by Apple Event Manager or application 23 | extern NSString *const kASErrorStringKey; // @"ErrorString"; error string returned by application, if given 24 | extern NSString *const kASErrorBriefMessageKey; // @"ErrorBriefMessage"; brief error string returned by application, if given 25 | extern NSString *const kASErrorExpectedTypeKey; // @"ErrorExpectedType"; AE type responsible for a coercion error (-1700), if given 26 | extern NSString *const kASErrorOffendingObjectKey; // @"ErrorOffendingObject"; value or object specifer responsible for error, if given 27 | extern NSString *const kASErrorFailedEvent; // @"ErrorFailedEvent"; the AEMEvent object that returned the error 28 | 29 | 30 | /**********************************************************************/ 31 | // typedefs 32 | 33 | typedef enum { 34 | kAEMDontUnpack, 35 | kAEMUnpackAsItem, 36 | kAEMUnpackAsList 37 | } AEMUnpackFormat; 38 | 39 | 40 | typedef OSErr(*AEMCreateProcPtr)(AEEventClass theAEEventClass, 41 | AEEventID theAEEventID, 42 | const AEAddressDesc *target, 43 | AEReturnID returnID, 44 | AETransactionID transactionID, 45 | AppleEvent *result); 46 | 47 | 48 | typedef OSStatus(*AEMSendProcPtr)(const AppleEvent *event, 49 | AppleEvent *reply, 50 | AESendMode sendMode, 51 | long timeOutInTicks); 52 | 53 | 54 | /**********************************************************************/ 55 | // Event class 56 | /* 57 | * Note: clients shouldn't instantiate AEMEvent directly; instead use AEMApplication -eventWith... methods. 58 | */ 59 | 60 | @interface AEMEvent : NSObject { 61 | AppleEvent *event; 62 | id codecs; 63 | AEMSendProcPtr sendProc; 64 | // type to coerce returned value to before unpacking it 65 | DescType resultType; 66 | AEMUnpackFormat resultFormat; 67 | } 68 | 69 | /* 70 | * Note: new AEMEvent instances are constructed by AEMApplication objects; 71 | * clients shouldn't instantiate this class directly. 72 | */ 73 | 74 | - (id)initWithEvent:(AppleEvent *)event_ 75 | codecs:(id)codecs_ 76 | sendProc:(AEMSendProcPtr)sendProc_; 77 | 78 | /* 79 | * Get codecs object used by this AEMEvent instance 80 | */ 81 | - (id)codecs; 82 | 83 | /* 84 | * Get a pointer to the AEDesc contained by this AEMEvent instance 85 | */ 86 | - (const AppleEvent *)aeDesc; 87 | 88 | /* 89 | * Get an NSAppleEventDescriptor instance containing a copy of this event 90 | */ 91 | - (NSAppleEventDescriptor *)descriptor; 92 | 93 | // Pack event's attributes and parameters, if any. 94 | 95 | - (void)setAttribute:(id)value forKeyword:(AEKeyword)key; 96 | 97 | - (void)setParameter:(id)value forKeyword:(AEKeyword)key; 98 | 99 | // Get event's attributes and parameters. 100 | 101 | - (id)attributeForKeyword:(AEKeyword)key type:(DescType)type error:(out NSError **)error; 102 | 103 | - (id)attributeForKeyword:(AEKeyword)key; // shortcut for above 104 | 105 | - (id)parameterForKeyword:(AEKeyword)key type:(DescType)type error:(out NSError **)error; 106 | 107 | - (id)parameterForKeyword:(AEKeyword)key; // shortcut for above 108 | 109 | /* 110 | * Specify how the the reply descriptor should be unpacked. 111 | * (Default = kAEMUnpackAsItem of typeWildCard) 112 | */ 113 | 114 | - (void)setUnpackFormat:(AEMUnpackFormat)format_ type:(DescType)type_; 115 | 116 | - (void)getUnpackFormat:(AEMUnpackFormat *)format_ type:(DescType *)type_; 117 | 118 | /* 119 | * Send event. 120 | 121 | * Parameters 122 | * 123 | * sendMode 124 | * kAEWaitReply 125 | * 126 | * timeoutInTicks 127 | * kAEDefaultTimeout 128 | * 129 | * error 130 | * On return, an NSError object that describes an Apple Event Manager or application 131 | * error if one has occurred, otherwise nil. Pass nil if not required. 132 | * 133 | * Return value 134 | * 135 | * The value returned by the application, or an NSNull instance if no value was returned, 136 | * or nil if an error occurred. 137 | * 138 | * Notes 139 | * 140 | * A single event can be sent more than once if desired. 141 | * 142 | */ 143 | 144 | - (id)sendWithMode:(AESendMode)sendMode timeout:(long)timeoutInTicks error:(out NSError **)error; 145 | 146 | // shortcuts for -sendWithMode:timeout:error: 147 | 148 | - (id)sendWithError:(out NSError **)error; 149 | 150 | - (id)send; 151 | 152 | @end 153 | 154 | -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Headers/objectrenderer.h: -------------------------------------------------------------------------------- 1 | // 2 | // formatter.m 3 | // appscript 4 | // 5 | 6 | 7 | @interface AEMObjectRenderer : NSObject 8 | 9 | +(NSString *)formatOSType:(OSType)code; 10 | 11 | +(void)formatObject:(id)obj indent:(NSString *)indent result:(NSMutableString *)result; 12 | 13 | +(NSString *)formatObject:(id)obj; 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Headers/parser.h: -------------------------------------------------------------------------------- 1 | // 2 | // parser.h 3 | // appscript 4 | // 5 | 6 | #import "types.h" 7 | #import "utils.h" 8 | #import "objectrenderer.h" 9 | 10 | 11 | /**********************************************************************/ 12 | 13 | 14 | @interface ASParserDef : NSObject { 15 | NSString *name; 16 | OSType code; 17 | unsigned hash; 18 | } 19 | 20 | - (id)initWithName:(NSString*)name_ code:(OSType)code_; 21 | - (NSString *)name; 22 | - (OSType)fourCharCode; 23 | 24 | @end 25 | 26 | 27 | /**********************************************************************/ 28 | 29 | 30 | @interface ASParserCommandDef : ASParserDef { 31 | OSType classCode; 32 | NSMutableSet *parameters; 33 | } 34 | 35 | - (id)initWithName:(NSString*)name eventClass:(OSType)classCode_ eventID:(OSType)code_; 36 | - (OSType)eventClass; 37 | - (OSType)eventID; 38 | - (void)addParameter:(ASParserDef *)def; 39 | - (NSSet *)parameters; 40 | @end 41 | 42 | 43 | /**********************************************************************/ 44 | 45 | 46 | @interface ASAETEParser : NSObject { 47 | char *aeteData; 48 | unsigned long aeteSize; 49 | unsigned long cursor; 50 | /* terminology tables; order is significant where synonym definitions occur */ 51 | NSMutableDictionary *commands; 52 | NSMutableSet *properties, *elements, *classes, *enumerators; 53 | /* use sets to record previously found definitions, and avoid adding duplicates to lists 54 | ** (i.e. 'name+code not in ' is quicker than using 'name+code not in ') 55 | */ 56 | NSMutableSet *foundProperties, *foundElements, *foundClasses, *foundEnumerators; 57 | /* ideally, aetes should define both singular and plural names for each class, but 58 | ** some define only one or the other so we need to fill in any missing ones afterwards 59 | */ 60 | NSMutableDictionary *classAndElementDefsByCode; 61 | NSMutableSet *foundClassCodes, *foundElementCodes; 62 | } 63 | 64 | - (unsigned short)integer; 65 | - (OSType)word; 66 | - (NSString *)name NS_RETURNS_RETAINED; 67 | 68 | - (void)parseCommand; 69 | - (void)parseClass; 70 | - (void)parseComparison; 71 | - (void)parseEnumeration; 72 | - (void)parseSuite; 73 | 74 | - (ASAETEParser *)parse:(id)aetes; 75 | 76 | - (NSArray *)classes; 77 | - (NSArray *)enumerators; 78 | - (NSArray *)properties; 79 | - (NSArray *)elements; 80 | - (NSArray *)commands; 81 | @end 82 | -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Headers/reference.h: -------------------------------------------------------------------------------- 1 | // 2 | // reference.h 3 | // appscript 4 | // 5 | 6 | #import "application.h" 7 | #import "constant.h" 8 | #import "specifier.h" 9 | #import "command.h" 10 | #import "utils.h" 11 | 12 | /**********************************************************************/ 13 | 14 | #define ASInt(val) [NSNumber numberWithInt: (int)val] 15 | #define ASLong(val) [NSNumber numberWithLong: (long)val] 16 | #define ASDouble(val) [NSNumber numberWithDouble: (double)val] 17 | 18 | /**********************************************************************/ 19 | // Reference base 20 | 21 | 22 | @interface ASReference : NSObject { 23 | id AS_appData; 24 | id AS_aemReference; 25 | } 26 | 27 | + (id)referenceWithAppData:(id)appData aemReference:(id)aemReference; 28 | 29 | - (id)initWithAppData:(id)appData aemReference:(id)aemReference; 30 | 31 | - (NSAppleEventDescriptor *)AS_packSelf:(id)codecs; 32 | 33 | - (id)AS_appData; 34 | 35 | - (id)AS_aemReference; 36 | 37 | - (void)AS_setRelaunchMode:(ASRelaunchMode)relaunchMode_; 38 | - (ASRelaunchMode)AS_relaunchMode; 39 | 40 | // is target application running? 41 | - (BOOL)isRunning; 42 | 43 | // launch the target application without sending it the usual 'run' event; 44 | // equivalent to 'launch' command in AppleScript. 45 | - (BOOL)launchApplicationWithError:(out NSError **)error; // may be nil 46 | 47 | - (BOOL)launchApplication; // convenience shortcut for the above 48 | 49 | 50 | // restart local application and/or update AEAddressDesc if needed 51 | // (typically used after application has quit; refreshes existing 52 | // application object without the need to recreate it) 53 | // note: only works for apps specified by name/path/bundle ID 54 | 55 | - (BOOL)reconnectApplicationWithError:(out NSError **)error; 56 | 57 | - (BOOL)reconnectApplication; 58 | 59 | 60 | // transaction support 61 | 62 | - (BOOL)beginTransactionWithError:(out NSError **)error; 63 | 64 | - (BOOL)beginTransactionWithSession:(id)session error:(out NSError **)error; 65 | 66 | - (BOOL)endTransactionWithError:(out NSError **)error; 67 | 68 | - (BOOL)abortTransactionWithError:(out NSError **)error; 69 | 70 | // get/set shortcuts 71 | 72 | // shortcut for [[[ref set] to: value] send] 73 | - (id)setItem:(id)data; 74 | - (id)setItem:(id)data error:(out NSError **)error; 75 | 76 | // shortcut for [[ref get] send] 77 | - (id)getItem; 78 | - (id)getItemWithError:(out NSError **)error; 79 | 80 | // shortcut for [[[ref get] returnList] send] 81 | - (id)getList; 82 | - (id)getListWithError:(out NSError **)error; 83 | 84 | // shortcut for [[[[ref get] requestedType: descType] returnType: descType] send] 85 | - (id)getItemOfType:(DescType)type; 86 | - (id)getItemOfType:(DescType)type error:(out NSError **)error; 87 | 88 | // shortcut for [[[[ref get] requestedType: descType] returnListOfType: descType] send] 89 | - (id)getListOfType:(DescType)type; 90 | - (id)getListOfType:(DescType)type error:(out NSError **)error; 91 | 92 | /* 93 | * shortcuts for getting numerical property values as C primitives 94 | */ 95 | 96 | // shortcut for [[[[[ref get] requestedType: typeSInt32] returnType: typeSInt32] send] intValue] 97 | - (int)getIntWithError:(out NSError **)error; 98 | 99 | // shortcut for [[[[[ref get] requestedType: typeSInt32] returnType: typeSInt32] send] intValue] in 32-bit builds, 100 | // and [[[[[ref get] requestedType: typeSInt64] returnType: typeSInt64] send] longValue] in 64-bit builds 101 | - (long)getLongWithError:(out NSError **)error; 102 | 103 | // shortcut for [[[[[ref get] requestedType: typeIEEE64BitFloatingPoint] returnType: typeIEEE64BitFloatingPoint] send] doubleValue] 104 | - (double)getDoubleWithError:(out NSError **)error; 105 | 106 | @end 107 | 108 | 109 | -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Headers/referencerenderer.h: -------------------------------------------------------------------------------- 1 | // 2 | // referencerenderer.h 3 | // appscript 4 | // 5 | 6 | #import "objectrenderer.h" 7 | #import "reference.h" 8 | #import "utils.h" 9 | 10 | /**********************************************************************/ 11 | // reference renderer abstract base 12 | 13 | @interface ASReferenceRenderer : AEMResolver { 14 | id appData; 15 | NSMutableString *result; 16 | } 17 | 18 | - (id)initWithAppData:(id)appData_; 19 | 20 | 21 | /*******/ 22 | // private 23 | 24 | - (NSString *)format:(id)object; 25 | - (NSString *)result; 26 | 27 | /*******/ 28 | // public 29 | // application-specific subclasses should override this method to provide their own prefix codes 30 | 31 | + (NSString *)formatObject:(id)object appData:(id)appData_; 32 | 33 | /*******/ 34 | // method stubs; application-specific subclasses will override to provide code->name translations 35 | 36 | - (NSString *)propertyByCode:(OSType)code; 37 | - (NSString *)elementByCode:(OSType)code; 38 | - (NSString *)prefix; 39 | 40 | @end 41 | 42 | -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Headers/sendthreadsafe.h: -------------------------------------------------------------------------------- 1 | /* 2 | File: AESendThreadSafe.h 3 | 4 | Contains: Code to send Apple events in a thread-safe manner. 5 | 6 | Written by: DTS 7 | 8 | Copyright: Copyright (c) 2007 Apple Inc. All Rights Reserved. 9 | 10 | Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. 11 | ("Apple") in consideration of your agreement to the following 12 | terms, and your use, installation, modification or 13 | redistribution of this Apple software constitutes acceptance of 14 | these terms. If you do not agree with these terms, please do 15 | not use, install, modify or redistribute this Apple software. 16 | 17 | In consideration of your agreement to abide by the following 18 | terms, and subject to these terms, Apple grants you a personal, 19 | non-exclusive license, under Apple's copyrights in this 20 | original Apple software (the "Apple Software"), to use, 21 | reproduce, modify and redistribute the Apple Software, with or 22 | without modifications, in source and/or binary forms; provided 23 | that if you redistribute the Apple Software in its entirety and 24 | without modifications, you must retain this notice and the 25 | following text and disclaimers in all such redistributions of 26 | the Apple Software. Neither the name, trademarks, service marks 27 | or logos of Apple Inc. may be used to endorse or promote 28 | products derived from the Apple Software without specific prior 29 | written permission from Apple. Except as expressly stated in 30 | this notice, no other rights or licenses, express or implied, 31 | are granted by Apple herein, including but not limited to any 32 | patent rights that may be infringed by your derivative works or 33 | by other works in which the Apple Software may be incorporated. 34 | 35 | The Apple Software is provided by Apple on an "AS IS" basis. 36 | APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 37 | WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, 38 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING 39 | THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN 40 | COMBINATION WITH YOUR PRODUCTS. 41 | 42 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, 43 | INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 44 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 45 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY 46 | OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION 47 | OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY 48 | OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR 49 | OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF 50 | SUCH DAMAGE. 51 | 52 | Change History (most recent first): 53 | 54 | $Log: AESendThreadSafe.h,v $ 55 | Revision 1.2 2007/02/12 11:58:43 56 | Corrected grammo in comment. 57 | 58 | Revision 1.1 2007/02/09 10:55:27 59 | First checked in. 60 | 61 | 62 | */ 63 | 64 | /* 65 | 66 | 2007/06/24 -- Modified by HAS to make AESendMessageThreadSafeSynchronous API-compatible with AESendMessage; renamed AEMSendMessageThreadSafe. 67 | 68 | */ 69 | 70 | #ifndef _AESENDTHREADSAFE_H 71 | #define _AESENDTHREADSAFE_H 72 | 73 | #include 74 | 75 | ///////////////////////////////////////////////////////////////// 76 | 77 | /* 78 | Introduction 79 | ------------ 80 | Since Mac OS X 10.2 it has been possible to synchronously send an Apple event 81 | from a thread other than the main thread. The technique for doing this is 82 | documented in Technote 2053 "Mac OS X 10.2". 83 | 84 | 85 | 86 | Unfortunately, this technique isn't quite right. Specifically, due to a bug 87 | in Apple Event Manager , it is not safe to dispose of 88 | the Mach port (using mach_port_destroy, as documented in the technote, or, more 89 | correctly, using mach_port_mod_refs) that you created to use as the reply port. 90 | Doing this triggers a race condition that, very rarely, can cause the system 91 | to destroy some other, completely unrelated, Mach port within your process. 92 | This could cause all sorts of problems. One common symptom is that, after 93 | accidentally destroying the Mach port associated with a thread, your program 94 | dies with the following message: 95 | 96 | /SourceCache/Libc/Libc-320.1.3/pthreads/pthread.c:897: failed assertion `ret == MACH_MSG_SUCCESS' 97 | 98 | The best workaround to this problem is to not dispose of the Mach port that 99 | you use as the Apple event reply port. If you have a limited number of 100 | secondary threads from which you need to send Apple events, it's relatively 101 | easy to allocate an Apple event reply port for each thread and then never 102 | dispose it. However, if you have general case code, it might be tricky 103 | to track down all of the threads that send Apple events and make sure they 104 | have reply ports. This module was designed as a general case solution to 105 | the problem. 106 | 107 | The module exports a single function, AESendMessageThreadSafeSynchronous, which, 108 | as its name suggests, sends an Apple event and waits for the reply (that is, 109 | a synchronous IPC) and is safe to call from an arbitrary thread. It's basically 110 | a wrapper around the system function AESendMessage, with added smarts to manage 111 | a per-thread Apple event reply port. 112 | 113 | When is fixed, this module should be unnecessary but 114 | benign. 115 | 116 | For information about how this works, see the comments in the implementation. 117 | */ 118 | 119 | ///////////////////////////////////////////////////////////////// 120 | 121 | #ifdef __cplusplus 122 | extern "C" { 123 | #endif 124 | 125 | OSStatus AEMSendMessageThreadSafe( 126 | AppleEvent * eventPtr, 127 | AppleEvent * replyPtr, 128 | AESendMode sendMode, 129 | long timeOutInTicks 130 | ); 131 | // A thread-safe replacement for AESend. This is very much like AESendMessage, 132 | // except that it takes care of setting up the reply port when you use it 133 | // from a thread other than the main thread. 134 | 135 | #ifdef __cplusplus 136 | } 137 | #endif 138 | 139 | #endif 140 | -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Headers/specifier.h: -------------------------------------------------------------------------------- 1 | // 2 | // specifier.h 3 | // aem 4 | // 5 | 6 | #import "base.h" 7 | #import "test.h" 8 | #import "utils.h" 9 | #import "objectrenderer.h" 10 | 11 | 12 | /**********************************************************************/ 13 | 14 | 15 | #define AEMApp [AEMApplicationRoot applicationRoot] 16 | #define AEMCon [AEMCurrentContainerRoot currentContainerRoot] 17 | #define AEMIts [AEMObjectBeingExaminedRoot objectBeingExaminedRoot] 18 | #define AEMRoot(object) [AEMCustomRoot customRootWithObject: object] 19 | 20 | 21 | /**********************************************************************/ 22 | // Forward declarations 23 | 24 | @class AEMPropertySpecifier; 25 | @class AEMUserPropertySpecifier; 26 | @class AEMElementByNameSpecifier; 27 | @class AEMElementByIndexSpecifier; 28 | @class AEMElementByIDSpecifier; 29 | @class AEMElementByOrdinalSpecifier; 30 | @class AEMElementByRelativePositionSpecifier; 31 | @class AEMElementsByRangeSpecifier; 32 | @class AEMElementsByTestSpecifier; 33 | @class AEMAllElementsSpecifier; 34 | 35 | @class AEMGreaterThanTest; 36 | @class AEMGreaterOrEqualsTest; 37 | @class AEMEqualsTest; 38 | @class AEMNotEqualsTest; 39 | @class AEMLessThanTest; 40 | @class AEMLessOrEqualsTest; 41 | @class AEMBeginsWithTest; 42 | @class AEMEndsWithTest; 43 | @class AEMContainsTest; 44 | @class AEMIsInTest; 45 | 46 | @class AEMSpecifier; 47 | @class AEMReferenceRootBase; 48 | @class AEMApplicationRoot; 49 | @class AEMCurrentContainerRoot; 50 | @class AEMObjectBeingExaminedRoot; 51 | @class AEMCustomRoot; 52 | 53 | @class AEMTest; 54 | 55 | 56 | /**********************************************************************/ 57 | // initialise constants 58 | 59 | void initSpecifierModule(void); // called automatically 60 | 61 | void disposeSpecifierModule(void); 62 | 63 | 64 | /**********************************************************************/ 65 | // Specifier base 66 | 67 | /* 68 | * Abstract base class for all object specifier classes. 69 | */ 70 | @interface AEMSpecifier : AEMQuery { 71 | AEMSpecifier *container; 72 | id key; 73 | } 74 | 75 | - (id)initWithContainer:(AEMSpecifier *)container_ key:(id)key_; 76 | 77 | // reserved methods 78 | 79 | - (id)key; // used by -isEqual: 80 | - (id)container; // used by -isEqual: 81 | 82 | - (AEMReferenceRootBase *)root; 83 | - (AEMSpecifier *)trueSelf; 84 | 85 | @end 86 | 87 | 88 | /**********************************************************************/ 89 | // Performance optimisation used by -[AEMCodecs unpackObjectSpecifier:] 90 | 91 | 92 | @interface AEMDeferredSpecifier : AEMSpecifier { 93 | id reference; 94 | NSAppleEventDescriptor *desc; 95 | id codecs; 96 | } 97 | 98 | - (id)initWithDescriptor:(NSAppleEventDescriptor *)desc_ codecs:(id)codecs_; 99 | 100 | - (id)realReference; 101 | 102 | @end 103 | 104 | 105 | /**********************************************************************/ 106 | // Insertion location specifier 107 | 108 | /* 109 | * A reference to an element insertion point. 110 | */ 111 | @interface AEMInsertionSpecifier : AEMSpecifier 112 | @end 113 | 114 | 115 | /**********************************************************************/ 116 | // Position specifier base 117 | 118 | /* 119 | * All property and element reference forms inherit from this abstract class. 120 | */ 121 | @interface AEMObjectSpecifier : AEMSpecifier { 122 | OSType wantCode; 123 | } 124 | 125 | - (id)initWithContainer:(AEMSpecifier *)container_ key:(id)key_ wantCode:(OSType)wantCode_; 126 | 127 | - (OSType)wantCode; // used by isEqual 128 | 129 | // Comparison and logic tests 130 | 131 | - (AEMGreaterThanTest *)greaterThan:(id)object; 132 | - (AEMGreaterOrEqualsTest *)greaterOrEquals:(id)object; 133 | - (AEMEqualsTest *)equals:(id)object; 134 | - (AEMNotEqualsTest *)notEquals:(id)object; 135 | - (AEMLessThanTest *)lessThan:(id)object; 136 | - (AEMLessOrEqualsTest *)lessOrEquals:(id)object; 137 | - (AEMBeginsWithTest *)beginsWith:(id)object; 138 | - (AEMEndsWithTest *)endsWith:(id)object; 139 | - (AEMContainsTest *)contains:(id)object; 140 | - (AEMIsInTest *)isIn:(id)object; 141 | 142 | // Insertion location selectors 143 | 144 | - (AEMInsertionSpecifier *)beginning; 145 | - (AEMInsertionSpecifier *)end; 146 | - (AEMInsertionSpecifier *)before; 147 | - (AEMInsertionSpecifier *)after; 148 | 149 | // property and all-element specifiers 150 | 151 | - (AEMPropertySpecifier *)property:(OSType)propertyCode; 152 | - (AEMUserPropertySpecifier *)userProperty:(NSString *)propertyName; 153 | - (AEMAllElementsSpecifier *)elements:(OSType)classCode; 154 | 155 | // by-relative-position selectors 156 | 157 | - (AEMElementByRelativePositionSpecifier *)previous:(OSType)classCode; 158 | - (AEMElementByRelativePositionSpecifier *)next:(OSType)classCode; 159 | 160 | @end 161 | 162 | 163 | /**********************************************************************/ 164 | // Properties 165 | 166 | /* 167 | * Specifier identifying an application-defined property 168 | */ 169 | @interface AEMPropertySpecifier : AEMObjectSpecifier 170 | @end 171 | 172 | 173 | @interface AEMUserPropertySpecifier : AEMObjectSpecifier 174 | @end 175 | 176 | 177 | /**********************************************************************/ 178 | // Single elements 179 | 180 | /* 181 | * Abstract base class for all single element specifiers 182 | */ 183 | @interface AEMSingleElementSpecifier : AEMObjectSpecifier 184 | @end 185 | 186 | /* 187 | * Specifiers identifying a single element by name, index, id or named ordinal 188 | */ 189 | @interface AEMElementByNameSpecifier : AEMSingleElementSpecifier 190 | @end 191 | 192 | @interface AEMElementByIndexSpecifier : AEMSingleElementSpecifier 193 | @end 194 | 195 | @interface AEMElementByIDSpecifier : AEMSingleElementSpecifier 196 | @end 197 | 198 | @interface AEMElementByOrdinalSpecifier : AEMSingleElementSpecifier 199 | @end 200 | 201 | @interface AEMElementByRelativePositionSpecifier : AEMObjectSpecifier 202 | @end 203 | 204 | 205 | /**********************************************************************/ 206 | // Multiple elements 207 | 208 | /* 209 | * Base class for all multiple element specifiers. 210 | */ 211 | @interface AEMMultipleElementsSpecifier : AEMObjectSpecifier 212 | 213 | // ordinal selectors 214 | 215 | - (AEMElementByOrdinalSpecifier *)first; 216 | - (AEMElementByOrdinalSpecifier *)middle; 217 | - (AEMElementByOrdinalSpecifier *)last; 218 | - (AEMElementByOrdinalSpecifier *)any; 219 | 220 | // by-index, by-name, by-id selectors 221 | 222 | - (AEMElementByIndexSpecifier *)at:(int)index; 223 | - (AEMElementByIndexSpecifier *)byIndex:(id)index; // normally NSNumber, but may occasionally be other types 224 | - (AEMElementByNameSpecifier *)byName:(id)name; 225 | - (AEMElementByIDSpecifier *)byID:(id)id_; 226 | 227 | // by-range selector 228 | 229 | - (AEMElementsByRangeSpecifier *)at:(int)startIndex to:(int)stopIndex; 230 | - (AEMElementsByRangeSpecifier *)byRange:(id)startReference to:(id)stopReference; // takes two con-based references, with other values being expanded as necessary 231 | 232 | // by-test selector 233 | 234 | - (AEMElementsByTestSpecifier *)byTest:(AEMTest *)testReference; 235 | 236 | @end 237 | 238 | 239 | @interface AEMElementsByRangeSpecifier : AEMMultipleElementsSpecifier { 240 | id startReference, stopReference; 241 | } 242 | 243 | - (id)initWithContainer:(AEMSpecifier *)container_ 244 | start:(id)startReference_ 245 | stop:(id)stopReference_ 246 | wantCode:(OSType)wantCode_; 247 | 248 | - (id)startReference; // used by isEqual: 249 | - (id)stopReference; // used by isEqual: 250 | 251 | @end 252 | 253 | 254 | @interface AEMElementsByTestSpecifier : AEMMultipleElementsSpecifier 255 | @end 256 | 257 | 258 | @interface AEMAllElementsSpecifier : AEMMultipleElementsSpecifier 259 | @end 260 | 261 | 262 | /**********************************************************************/ 263 | // Multiple element shim 264 | 265 | @interface AEMUnkeyedElementsShim : AEMSpecifier { 266 | OSType wantCode; 267 | } 268 | 269 | - (id)initWithContainer:(AEMSpecifier *)container_ wantCode:(OSType)wantCode_; 270 | 271 | @end 272 | 273 | 274 | /**********************************************************************/ 275 | // Reference roots 276 | 277 | @interface AEMReferenceRootBase : AEMObjectSpecifier // abstract class 278 | 279 | // note: clients should avoid initialising this class directly; 280 | // use provided class methods or convenience macros instead 281 | 282 | @end 283 | 284 | @interface AEMApplicationRoot : AEMReferenceRootBase 285 | 286 | + (AEMApplicationRoot *)applicationRoot; 287 | 288 | @end 289 | 290 | @interface AEMCurrentContainerRoot : AEMReferenceRootBase 291 | 292 | + (AEMCurrentContainerRoot *)currentContainerRoot; 293 | 294 | @end 295 | 296 | @interface AEMObjectBeingExaminedRoot : AEMReferenceRootBase 297 | 298 | + (AEMObjectBeingExaminedRoot *)objectBeingExaminedRoot; 299 | 300 | @end 301 | 302 | @interface AEMCustomRoot : AEMReferenceRootBase { 303 | id rootObject; 304 | } 305 | 306 | + (AEMCustomRoot *)customRootWithObject:(id)object; 307 | 308 | - (id)initWithObject:(id)object; 309 | 310 | - (id)rootObject; // used by isEqual 311 | 312 | @end 313 | 314 | -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Headers/terminology.h: -------------------------------------------------------------------------------- 1 | // 2 | // terminology.h 3 | // appscript 4 | // 5 | 6 | #import "types.h" 7 | #import "parser.h" 8 | #import "utils.h" 9 | #import "objectrenderer.h" 10 | 11 | 12 | /**********************************************************************/ 13 | 14 | 15 | @interface ASNullConverter : NSObject 16 | 17 | - (NSString *)convert:(NSString *)name; 18 | 19 | - (NSString *)escape:(NSString *)name; 20 | 21 | @end 22 | 23 | 24 | /**********************************************************************/ 25 | 26 | 27 | @interface ASCommandDef : NSObject { 28 | NSString *name; 29 | OSType eventClass, eventID; 30 | NSMutableDictionary *parameters; 31 | } 32 | 33 | - (id)initWithName:(NSString *)name_ eventClass:(OSType)eventClass_ eventID:(OSType)eventID_; 34 | 35 | - (void)addParameterWithName:(NSString *)name_ code:(OSType)code_; 36 | 37 | // PUBLIC 38 | 39 | - (NSString *)name; 40 | 41 | - (OSType)eventClass; 42 | 43 | - (OSType)eventID; 44 | 45 | - (AEMType *)parameterForName:(NSString *)name_; 46 | 47 | @end 48 | 49 | 50 | /**********************************************************************/ 51 | 52 | 53 | @interface ASTerminology : NSObject { 54 | NSMutableDictionary *typeByName, 55 | *typeByCode, 56 | *propertyByName, 57 | *propertyByCode, 58 | *elementByName, 59 | *elementByCode, 60 | *commandByName; 61 | id converter; 62 | NSMutableDictionary *keywordCache; 63 | ASTerminology *defaultTerms; 64 | } 65 | 66 | // PUBLIC 67 | 68 | /* 69 | * converter : AS keyword string to C identifer string converter; should implement: 70 | * -(NSString *)convert:(NSString *)name 71 | * -(NSString *)escape:(NSString *)name 72 | * 73 | * defaultTerms may be nil 74 | */ 75 | - (id)initWithKeywordConverter:(id)converter_ 76 | defaultTerminology:(ASTerminology *)defaultTerms_; 77 | 78 | /* 79 | * add data from ASParser or equivalent 80 | */ 81 | - (void)addClasses:(NSArray *)classes 82 | enumerators:(NSArray *)enumerators 83 | properties:(NSArray *)properties 84 | elements:(NSArray *)elements 85 | commands:(NSArray *)commands; 86 | 87 | // PRIVATE; used by addClasses:...commands: method 88 | 89 | - (void)addTypeTableDefinitions:(NSArray *)definitions ofType:(OSType)descType; 90 | 91 | - (void)addReferenceTableDefinitions:(NSArray *)definitions 92 | toNameTable:(NSMutableDictionary *)nameTable 93 | codeTable:(NSMutableDictionary *)codeTable; 94 | 95 | - (void)addCommandTableDefinitions:(NSArray *)commands; 96 | 97 | // PUBLIC 98 | // Get conversion tables (no copy) 99 | 100 | - (NSMutableDictionary *)typeByNameTable; 101 | - (NSMutableDictionary *)typeByCodeTable; 102 | - (NSMutableDictionary *)propertyByNameTable; 103 | - (NSMutableDictionary *)propertyByCodeTable; 104 | - (NSMutableDictionary *)elementByNameTable; 105 | - (NSMutableDictionary *)elementByCodeTable; 106 | - (NSMutableDictionary *)commandByNameTable; 107 | 108 | @end 109 | 110 | -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Headers/test.h: -------------------------------------------------------------------------------- 1 | // 2 | // test.h 3 | // aem 4 | // 5 | 6 | 7 | #import "base.h" 8 | #import "specifier.h" 9 | #import "utils.h" 10 | 11 | 12 | /**********************************************************************/ 13 | // Forward declarations 14 | 15 | @class AEMANDTest; 16 | @class AEMORTest; 17 | @class AEMNOTTest; 18 | 19 | 20 | /**********************************************************************/ 21 | // initialise constants 22 | 23 | void initTestModule(void); // called automatically 24 | 25 | void disposeTestModule(void); 26 | 27 | 28 | /**********************************************************************/ 29 | // Abstract base class for all comparison and logic test classes 30 | 31 | @interface AEMTest : AEMQuery 32 | 33 | - (AEMANDTest *)AND:(id)remainingOperands; // takes a single test clause or an NSArray of test clauses 34 | - (AEMORTest *)OR:(id)remainingOperands; 35 | - (AEMNOTTest *)NOT; 36 | 37 | - (NSString *)formatString; 38 | 39 | @end 40 | 41 | 42 | /**********************************************************************/ 43 | // Comparison tests 44 | 45 | // Abstract base class for all comparison test classes 46 | @interface AEMComparisonTest : AEMTest { 47 | id operand1, operand2; 48 | } 49 | 50 | - (id)initWithOperand1:(id)operand1_ operand2:(id)operand2_; 51 | 52 | - (id)operand1; // used by isEqual: 53 | - (id)operand2; // used by isEqual: 54 | 55 | @end 56 | 57 | // comparison tests 58 | // Note: clients should not instantiate these classes directly 59 | 60 | @interface AEMGreaterThanTest : AEMComparisonTest 61 | @end 62 | 63 | @interface AEMGreaterOrEqualsTest : AEMComparisonTest 64 | @end 65 | 66 | @interface AEMEqualsTest : AEMComparisonTest 67 | @end 68 | 69 | @interface AEMNotEqualsTest : AEMComparisonTest 70 | @end 71 | 72 | @interface AEMLessThanTest : AEMComparisonTest 73 | @end 74 | 75 | @interface AEMLessOrEqualsTest : AEMComparisonTest 76 | @end 77 | 78 | @interface AEMBeginsWithTest : AEMComparisonTest 79 | @end 80 | 81 | @interface AEMEndsWithTest : AEMComparisonTest 82 | @end 83 | 84 | @interface AEMContainsTest : AEMComparisonTest 85 | @end 86 | 87 | @interface AEMIsInTest : AEMComparisonTest 88 | @end 89 | 90 | 91 | /**********************************************************************/ 92 | // Logical tests 93 | 94 | // Abstract base class for all logical test classes 95 | @interface AEMLogicalTest : AEMTest { 96 | NSArray *operands; 97 | } 98 | 99 | - (id)initWithOperands:(NSArray *)operands_; 100 | 101 | - (id)operands; // used by isEqual: 102 | 103 | @end 104 | 105 | // logical tests 106 | // Note: clients should not instantiate these classes directly 107 | 108 | @interface AEMANDTest : AEMLogicalTest 109 | @end 110 | 111 | @interface AEMORTest : AEMLogicalTest 112 | @end 113 | 114 | @interface AEMNOTTest : AEMLogicalTest 115 | @end 116 | 117 | -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Headers/types.h: -------------------------------------------------------------------------------- 1 | // 2 | // types.h 3 | // aem 4 | // 5 | 6 | #import "utils.h" 7 | #import "objectrenderer.h" 8 | 9 | /**********************************************************************/ 10 | // not defined in __LP64__ 11 | 12 | #ifdef __LP64__ 13 | enum { typeFSS = 'fss ' }; 14 | #endif 15 | 16 | 17 | /**********************************************************************/ 18 | // convenience macros 19 | 20 | #define ASTrue [ASBoolean True] 21 | #define ASFalse [ASBoolean False] 22 | 23 | 24 | /**********************************************************************/ 25 | // Boolean class represents AEDescs of typeTrue and typeFalse 26 | 27 | 28 | @interface ASBoolean : NSObject { 29 | BOOL boolValue; 30 | NSAppleEventDescriptor *cachedDesc; 31 | } 32 | 33 | + (id)True; 34 | 35 | + (id)False; 36 | 37 | // client's shouldn't call -initWithBool: directly; use +True/+False (or ASTrue/ASFalse macros) instead 38 | - (id)initWithBool:(BOOL)boolValue_; 39 | 40 | - (BOOL)boolValue; 41 | 42 | - (NSAppleEventDescriptor *)descriptor; 43 | 44 | @end 45 | 46 | 47 | /**********************************************************************/ 48 | // file object classes represent AEDescs of typeAlias, typeFSRef, typeFSSpec 49 | 50 | //abstract base class 51 | @interface ASFileBase : NSObject { 52 | NSAppleEventDescriptor *desc; 53 | } 54 | 55 | + (NSURL *)HFSPathToURL:(NSString *)path; 56 | 57 | + (NSString *)URLToHFSPath:(NSURL *)url; 58 | 59 | - (id)initWithPath:(NSString *)path; 60 | 61 | - (id)initWithFileURL:(NSURL *)url; 62 | 63 | - (id)initWithDescriptor:(NSAppleEventDescriptor *)desc_; 64 | 65 | - (NSString *)path; 66 | 67 | - (NSURL *)url; 68 | 69 | - (NSAppleEventDescriptor *)descriptor; 70 | 71 | - (DescType)descriptorType; 72 | 73 | @end 74 | 75 | 76 | /***********************************/ 77 | // concrete classes 78 | 79 | @interface ASAlias : ASFileBase 80 | 81 | + (id)aliasWithPath:(NSString *)path; 82 | 83 | + (id)aliasWithFileURL:(NSURL *)url; 84 | 85 | + (id)aliasWithDescriptor:(NSAppleEventDescriptor *)desc_; 86 | 87 | + (id)aliasWithAliasHandle:(AliasHandle)alias; 88 | 89 | - (AliasHandle)aliasHandle; 90 | 91 | @end 92 | 93 | 94 | @interface ASFileRef : ASFileBase 95 | 96 | + (id)fileRefWithPath:(NSString *)path; 97 | 98 | + (id)fileRefWithFileURL:(NSURL *)url; 99 | 100 | + (id)fileRefWithDescriptor:(NSAppleEventDescriptor *)desc_; 101 | 102 | + (id)fileRefWithFSRef:(FSRef)fsRef; 103 | 104 | - (FSRef)fsRef; 105 | 106 | @end 107 | 108 | 109 | @interface ASFileSpec : ASFileBase 110 | /* 111 | * Provided solely for backward compatibility with unreformed 112 | * Classic-era applications that don't understand typeFileURL. 113 | * 114 | * Avoid using this class unless absolutely necessary as 115 | * FSSpecs are deprecated in OS X and absent in 64-bit. 116 | * 117 | * To quote AEDataModel.h: 118 | * 119 | * FSSpecs are deprecated on Mac OS X, and their use in AppleEvents 120 | * is discouraged. You should change your code to use FSRefs. In 121 | * __LP64__ code, coercions into typeFSS is not supported, and coercion 122 | * from typeFSS is not guaranteed to work correctly in all cases. 123 | */ 124 | 125 | + (id)fileSpecWithPath:(NSString *)path; 126 | 127 | + (id)fileSpecWithFileURL:(NSURL *)url; 128 | 129 | + (id)fileSpecWithDescriptor:(NSAppleEventDescriptor *)desc_; 130 | 131 | @end 132 | 133 | 134 | /**********************************************************************/ 135 | 136 | // abstract base class for AEMType, AEMEnum, AEMProperty, AEMKeyword 137 | @interface AEMTypeBase : NSObject { 138 | DescType type; 139 | OSType code; 140 | NSAppleEventDescriptor *cachedDesc; 141 | } 142 | 143 | // clients shouldn't call this next method directly; use subclasses' class/instance initialisers instead 144 | - (id)initWithDescriptorType:(DescType)type_ 145 | code:(OSType)code_ 146 | desc:(NSAppleEventDescriptor *)desc; 147 | 148 | - (id)initWithDescriptor:(NSAppleEventDescriptor *)desc; // normally called by AEMCodecs -unpack:, though clients could also use it to wrap any loose NSAppleEventDescriptor instances they might have. Note: doesn't verify descriptor's type before use; clients are responsible for providing an appropriate value. 149 | 150 | - (id)initWithCode:(OSType)code_; // stub method; subclasses will override this to provide concrete implementations 151 | 152 | - (OSType)fourCharCode; 153 | 154 | - (NSAppleEventDescriptor *)descriptor; 155 | 156 | @end 157 | 158 | 159 | /***********************************/ 160 | // concrete classes representing AEDescs of typeType, typeEnumerator, typeProperty, typeKeyword 161 | // note: unlike NSAppleEventDescriptor instances, instances of these classes are fully hashable 162 | // and comparable, so suitable for use as NSDictionary keys. 163 | 164 | @interface AEMType : AEMTypeBase 165 | 166 | + (id)typeWithCode:(OSType)code_; 167 | 168 | @end 169 | 170 | 171 | @interface AEMEnum : AEMTypeBase 172 | 173 | + (id)enumWithCode:(OSType)code_; 174 | 175 | @end 176 | 177 | 178 | @interface AEMProperty : AEMTypeBase 179 | 180 | + (id)propertyWithCode:(OSType)code_; 181 | 182 | @end 183 | 184 | 185 | @interface AEMKeyword : AEMTypeBase 186 | 187 | + (id)keywordWithCode:(OSType)code_; 188 | 189 | @end 190 | 191 | 192 | /**********************************************************************/ 193 | // Unit types 194 | 195 | @interface ASUnits : NSObject { 196 | NSNumber *value; 197 | NSString *units; 198 | } 199 | 200 | + (id)unitsWithNumber:(NSNumber *)value_ type:(NSString *)units_; 201 | 202 | + (id)unitsWithInt:(int)value_ type:(NSString *)units_; 203 | 204 | + (id)unitsWithDouble:(double)value_ type:(NSString *)units_; 205 | 206 | - (id)initWithNumber:(NSNumber *)value_ type:(NSString *)units_; 207 | 208 | - (NSNumber *)numberValue; 209 | 210 | - (int)intValue; 211 | 212 | - (double)doubleValue; 213 | 214 | - (NSString *)units; 215 | 216 | @end 217 | -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Headers/unittype.h: -------------------------------------------------------------------------------- 1 | // 2 | // unittype.h 3 | // aem 4 | // 5 | 6 | #import "types.h" 7 | #import "utils.h" 8 | 9 | 10 | /**********************************************************************/ 11 | // Unit type definition 12 | 13 | @interface AEMUnitTypeDefinition : NSObject { 14 | NSString *name; 15 | DescType code; 16 | } 17 | 18 | + (id)definitionWithName:(NSString *)name_ code:(DescType)code_; 19 | 20 | - (id)initWithName:(NSString *)name_ code:(DescType)code_; 21 | 22 | - (NSString *)name; 23 | 24 | - (DescType)code; 25 | 26 | /* 27 | * The default implementation packs and unpacks the descriptor's data 28 | * handle as a double. Override these methods to support other formats. 29 | */ 30 | - (NSAppleEventDescriptor *)pack:(ASUnits *)obj; 31 | 32 | - (ASUnits *)unpack:(NSAppleEventDescriptor *)desc; 33 | 34 | @end 35 | 36 | /**********************************************************************/ 37 | // called by -[AEMCodecs init] 38 | 39 | void AEMGetDefaultUnitTypeDefinitions(NSDictionary **definitionsByName, 40 | NSDictionary **definitionsByCode); -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Headers/utils.h: -------------------------------------------------------------------------------- 1 | // 2 | // utils.h 3 | // Appscript 4 | // 5 | 6 | #import 7 | #import 8 | 9 | /**********************************************************************/ 10 | // Clang macros 11 | 12 | #ifndef NSINTEGER_DEFINED 13 | 14 | #if __LP64__ || NS_BUILD_32_LIKE_64 15 | typedef long NSInteger; 16 | typedef unsigned long NSUInteger; 17 | #else 18 | typedef int NSInteger; 19 | typedef unsigned int NSUInteger; 20 | #endif 21 | 22 | 23 | #define NSIntegerMax LONG_MAX 24 | #define NSIntegerMin LONG_MIN 25 | #define NSUIntegerMax ULONG_MAX 26 | 27 | #define NSINTEGER_DEFINED 1 28 | 29 | #endif 30 | 31 | 32 | 33 | #ifndef __has_feature 34 | #define __has_feature(x) 0 35 | #endif 36 | 37 | #ifndef NS_RETURNS_RETAINED 38 | 39 | #if __has_feature(attribute_ns_returns_retained) 40 | #define NS_RETURNS_RETAINED __attribute__((ns_returns_retained)) 41 | #else 42 | #define NS_RETURNS_RETAINED 43 | #endif 44 | 45 | #endif 46 | 47 | 48 | /**********************************************************************/ 49 | 50 | #define AEMIsDescriptorEqualToObject(desc, obj) ( \ 51 | [obj isKindOfClass: [NSAppleEventDescriptor class]] \ 52 | && ([desc descriptorType] == [obj descriptorType]) \ 53 | && [[desc data] isEqualToData: [obj data]]) 54 | 55 | 56 | /**********************************************************************/ 57 | // supported by all self-packing objects 58 | 59 | @protocol AEMSelfPackingProtocol 60 | 61 | - (NSAppleEventDescriptor *)packWithCodecs:(id)codecs; 62 | 63 | @end 64 | 65 | 66 | /**********************************************************************/ 67 | 68 | @protocol AEMCodecsProtocol 69 | 70 | - (NSAppleEventDescriptor *)pack:(id)obj; 71 | 72 | - (NSAppleEventDescriptor *)applicationRootDescriptor; 73 | 74 | - (id)unpack:(NSAppleEventDescriptor *)desc; 75 | 76 | - (id)fullyUnpackObjectSpecifier:(NSAppleEventDescriptor *)desc; 77 | 78 | @end 79 | 80 | 81 | /**********************************************************************/ 82 | 83 | typedef enum { 84 | kASRelaunchNever, 85 | kASRelaunchSpecial, 86 | kASRelaunchAlways 87 | } ASRelaunchMode; 88 | 89 | 90 | /**********************************************************************/ 91 | 92 | NSString *ASDescriptionForError(OSStatus err); -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Resources/BridgeSupport/Appscript.bridgesupport: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 11A511 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | Appscript 11 | CFBundleIdentifier 12 | net.sourceforge.appscript.objc-appscript 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | Appscript 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 0.1.0 23 | DTCompiler 24 | com.apple.compilers.llvm.clang.1_0 25 | DTPlatformBuild 26 | 4B110 27 | DTPlatformVersion 28 | GM 29 | DTSDKBuild 30 | 10J567 31 | DTSDKName 32 | macosx10.6 33 | DTXcode 34 | 0410 35 | DTXcodeBuild 36 | 4B110 37 | 38 | 39 | -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/A/_CodeSignature/CodeResources: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | files 6 | 7 | Resources/BridgeSupport/Appscript.bridgesupport 8 | 9 | /FWzoiY7+H7PaavwSn5xyZgEJS4= 10 | 11 | Resources/Info.plist 12 | 13 | G/JFGsVyRRHss890XcHfxKf32HQ= 14 | 15 | 16 | rules 17 | 18 | ^Resources/ 19 | 20 | ^Resources/.*\.lproj/ 21 | 22 | optional 23 | 24 | weight 25 | 1000 26 | 27 | ^Resources/.*\.lproj/locversion.plist$ 28 | 29 | omit 30 | 31 | weight 32 | 1100 33 | 34 | ^version.plist$ 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Frameworks/Appscript.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 12D78 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | JSON Helper 11 | CFBundleIconFile 12 | json.icns 13 | CFBundleIdentifier 14 | com.vidblishen.jsonhelper 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | JSON Helper 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.04 23 | CFBundleSignature 24 | DfaB 25 | CFBundleVersion 26 | 1.04 27 | DTCompiler 28 | com.apple.compilers.llvm.clang.1_0 29 | DTPlatformBuild 30 | 4H512 31 | DTPlatformVersion 32 | GM 33 | DTSDKBuild 34 | 12D75 35 | DTSDKName 36 | macosx10.8 37 | DTXcode 38 | 0461 39 | DTXcodeBuild 40 | 4H512 41 | LSApplicationCategoryType 42 | public.app-category.developer-tools 43 | LSBackgroundOnly 44 | 45 | NSAppleScriptEnabled 46 | YES 47 | NSMainNibFile 48 | MainMenu 49 | NSPrincipalClass 50 | NSApplication 51 | OSAScriptingDefinition 52 | JSON Helper.sdef 53 | 54 | 55 | -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/MacOS/JSON Helper: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surrealroad/alfred-notes/7257536915fcf5a9bb24ba42fe720bcc61c5cd87/bin/q_json.helper/Contents/MacOS/JSON Helper -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/PkgInfo: -------------------------------------------------------------------------------- 1 | APPLDfaB -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Resources/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surrealroad/alfred-notes/7257536915fcf5a9bb24ba42fe720bcc61c5cd87/bin/q_json.helper/Contents/Resources/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Resources/English.lproj/MainMenu.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surrealroad/alfred-notes/7257536915fcf5a9bb24ba42fe720bcc61c5cd87/bin/q_json.helper/Contents/Resources/English.lproj/MainMenu.nib -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Resources/JSON Helper.sdef: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 93 | 94 | 95 | 96 | 98 | 99 | 100 | 101 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/Resources/json.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surrealroad/alfred-notes/7257536915fcf5a9bb24ba42fe720bcc61c5cd87/bin/q_json.helper/Contents/Resources/json.icns -------------------------------------------------------------------------------- /bin/q_json.helper/Contents/_CodeSignature/CodeResources: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | files 6 | 7 | Resources/English.lproj/InfoPlist.strings 8 | 9 | hash 10 | 11 | d/1b591E9fsKr9ppvfN99e6s/9Y= 12 | 13 | optional 14 | 15 | 16 | Resources/English.lproj/MainMenu.nib 17 | 18 | hash 19 | 20 | qlaN3ODh2UX1vsT62p/DAPYZ/hw= 21 | 22 | optional 23 | 24 | 25 | Resources/JSON Helper.sdef 26 | 27 | 0N9Shz5x8RzkXicSZgqGQg7cDqc= 28 | 29 | Resources/json.icns 30 | 31 | SVXTiQESCWxAwFL5+DtxHMFd1p8= 32 | 33 | 34 | rules 35 | 36 | ^Resources/ 37 | 38 | ^Resources/.*\.lproj/ 39 | 40 | optional 41 | 42 | weight 43 | 1000 44 | 45 | ^Resources/.*\.lproj/locversion.plist$ 46 | 47 | omit 48 | 49 | weight 50 | 1100 51 | 52 | ^version.plist$ 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /bin/q_notifier.helper: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surrealroad/alfred-notes/7257536915fcf5a9bb24ba42fe720bcc61c5cd87/bin/q_notifier.helper -------------------------------------------------------------------------------- /cache-notes.applescript: -------------------------------------------------------------------------------- 1 | property bundleid : "com.surrealroad.alfred-note" 2 | property cacheFile : "cache.plist" 3 | 4 | on run 5 | set myPath to path to me 6 | tell application "Finder" to set workflowFolder to (folder of myPath) as string 7 | set lib to load script file (workflowFolder & "alfred_library.scpt") 8 | set wf to load script file (workflowFolder & "q_workflow.scpt") 9 | 10 | set wf to wf's new_workflow_with_bundle(bundleid) 11 | set cachePath to wf's _data & cacheFile 12 | 13 | --create plist if it doesn't already exist 14 | if not wf's q_file_exists(cachePath) then 15 | -- OS 10.10 workaround 16 | do shell script "defaults write " & quoted form of cachePath & " cacheInProgress 0" 17 | end if 18 | 19 | 20 | wf's set_value("cacheInProgress", (lib's unixtime(current date)), cacheFile) 21 | 22 | tell application id "com.apple.notes" 23 | set existingNotes to {} 24 | set noteList to every note 25 | 26 | repeat with note_item in noteList 27 | set noteRecord to {uid:note_item's id} 28 | set noteRecord to noteRecord & {title:note_item's name} 29 | if note_item's body is not missing value then set noteRecord to noteRecord & {notebody:note_item's body} 30 | set noteRecord to noteRecord & {creationdate:note_item's creation date} 31 | set noteRecord to noteRecord & {parentfolder:(note_item's container's name)} 32 | 33 | set end of existingNotes to noteRecord 34 | end repeat 35 | set closeNotes to wf's get_value("closeNotes", cacheFile) 36 | if closeNotes is not missing value and closeNotes then quit 37 | 38 | end tell 39 | wf's set_value("timestamp", (current date), cacheFile) 40 | wf's set_value("existingReminders", existingNotes, cacheFile) 41 | wf's set_value("cacheInProgress", 0, cacheFile) 42 | 43 | return 44 | end run -------------------------------------------------------------------------------- /cache-notes.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surrealroad/alfred-notes/7257536915fcf5a9bb24ba42fe720bcc61c5cd87/cache-notes.scpt -------------------------------------------------------------------------------- /cache-update.applescript: -------------------------------------------------------------------------------- 1 | property cacheFile : "cache.plist" 2 | 3 | on run argv 4 | set bundleid to item 1 of argv 5 | set currentversion to item 2 of argv 6 | set myPath to path to me 7 | tell application "Finder" to set workflowFolder to (folder of myPath) as string 8 | set lib to load script file (workflowFolder & "alfred_library.scpt") 9 | set wf to load script file (workflowFolder & "q_workflow.scpt") 10 | 11 | set wf to wf's new_workflow_with_bundle(bundleid) 12 | set cachePath to wf's _data & cacheFile 13 | 14 | --create plist if it doesn't already exist 15 | if not wf's q_file_exists(cachePath) then 16 | -- OS 10.10 workaround 17 | do shell script "defaults write " & quoted form of cachePath & " cacheInProgress 0" 18 | end if 19 | 20 | wf's set_value("updatecheck", (current date), cacheFile) 21 | 22 | try 23 | set latestVersionInfo to lib's splitByColon(lib's checkVersion(bundleid)) 24 | if item 1 of latestVersionInfo is "version" then set latestversion to item 2 of latestVersionInfo 25 | set isLatest to (currentversion is greater than or equal to latestversion) 26 | on error 27 | set isLatest to true 28 | end try 29 | 30 | wf's set_value("isLatestVersion", isLatest, cacheFile) 31 | wf's set_value("latestversion", latestversion, cacheFile) 32 | 33 | return isLatest 34 | end run -------------------------------------------------------------------------------- /cache-update.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surrealroad/alfred-notes/7257536915fcf5a9bb24ba42fe720bcc61c5cd87/cache-update.scpt -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surrealroad/alfred-notes/7257536915fcf5a9bb24ba42fe720bcc61c5cd87/icon.png -------------------------------------------------------------------------------- /info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | bundleid 6 | com.surrealroad.alfred-note-icloud 7 | connections 8 | 9 | 6903AA5D-B4EF-4B6A-837F-8FC842FD9721 10 | 11 | 12 | destinationuid 13 | CE8709B4-F813-4766-982F-4BD872C7BF77 14 | modifiers 15 | 0 16 | modifiersubtext 17 | 18 | vitoclose 19 | 20 | 21 | 22 | A06E633A-6DA1-480D-9666-79AE7FA0E96B 23 | 24 | 25 | destinationuid 26 | FFC9C9E2-2539-44FD-A081-41DE4D12210D 27 | modifiers 28 | 0 29 | modifiersubtext 30 | 31 | vitoclose 32 | 33 | 34 | 35 | destinationuid 36 | 05A11783-4E0A-44F5-9EB3-D3CF6824EF1B 37 | modifiers 38 | 524288 39 | modifiersubtext 40 | Create and open note in new window 41 | vitoclose 42 | 43 | 44 | 45 | F091FF34-55E2-45C1-ABD7-32DCA6578F3D 46 | 47 | 48 | destinationuid 49 | FFC9C9E2-2539-44FD-A081-41DE4D12210D 50 | modifiers 51 | 0 52 | modifiersubtext 53 | 54 | vitoclose 55 | 56 | 57 | 58 | destinationuid 59 | 05A11783-4E0A-44F5-9EB3-D3CF6824EF1B 60 | modifiers 61 | 524288 62 | modifiersubtext 63 | Create and open note in new window 64 | vitoclose 65 | 66 | 67 | 68 | FFC9C9E2-2539-44FD-A081-41DE4D12210D 69 | 70 | 71 | destinationuid 72 | 159A291E-3339-491E-8D3F-79091BE0319B 73 | modifiers 74 | 0 75 | modifiersubtext 76 | 77 | vitoclose 78 | 79 | 80 | 81 | 82 | createdby 83 | Jack James 84 | description 85 | Adds notes to iCloud-enabled Notes.app 86 | disabled 87 | 88 | name 89 | Notes for Alfred 3 and iCloud 90 | objects 91 | 92 | 93 | config 94 | 95 | alfredfiltersresults 96 | 97 | argumenttype 98 | 0 99 | escaping 100 | 4 101 | keyword 102 | n 103 | queuedelaycustom 104 | 1 105 | queuedelayimmediatelyinitially 106 | 107 | queuedelaymode 108 | 0 109 | queuemode 110 | 1 111 | runningsubtext 112 | Fetching notes… 113 | script 114 | property notesAccount : "" property notesFolder : "" 115 | 116 | property cacheExpires : 2 * minutes 117 | property shouldCheckForUpdates : true 118 | property checkFrequency : 4 * days 119 | 120 | property currentVersion : 5 121 | property workflowFolder : do shell script "pwd" property lib : load script POSIX file (workflowFolder & "/alfred_library.scpt") 122 | property wf : load script POSIX file (workflowFolder & "/q_workflow.scpt") 123 | property wfname : "Notes" 124 | property bundleid : "com.surrealroad.alfred-note-icloud" property uid : "add-note" property addActionTitle : "Add Note" property cacheFile : "cache.plist" 125 | 126 | set wf to wf's new_workflow_with_bundle(bundleid) 127 | set workflowFolder of lib to workflowFolder my alfred_script("{query}") on alfred_script(q) 128 | --if q is "help" then return lib's alfred_result_items({lib's reminderHelp()}) -- set create note action set theText to "" set valid to "no" 129 | lib's setNotesActive() 130 | set theText to q if theText is "" then set valid to "no" else set valid to "yes" end if if valid is "no" then set subtitle to "Create a new note" else set subtitle to lib's formatNoteSubtitle(theText, notesAccount, notesFolder) end if 131 | set addAction to "" 132 | if theText is not "" then set addAction to lib's alfred_result_item(uid, addActionTitle, subtitle, q, valid) --fetch exisitng reminders 133 | (* set reminderList to {} set existingReminders to lib's fetchReminderList(wf, cacheFile, cacheExpires) set filteredReminders to lib's filterReminders(existingReminders, q) 134 | *) 135 | 136 | --version check 137 | set versionAction to "" 138 | if shouldCheckForUpdates then 139 | try 140 | set versionAction to lib's alfred_version_notify(wfname, bundleid, currentVersion, wf, cacheFile, checkFrequency) 141 | end try 142 | end if return lib's alfred_result_items({versionAction, addAction}) end alfred_script 143 | scriptargtype 144 | 0 145 | scriptfile 146 | 147 | subtext 148 | Adds a new note in Notes.app 149 | title 150 | Add Note 151 | type 152 | 6 153 | withspace 154 | 155 | 156 | type 157 | alfred.workflow.input.scriptfilter 158 | uid 159 | F091FF34-55E2-45C1-ABD7-32DCA6578F3D 160 | version 161 | 2 162 | 163 | 164 | config 165 | 166 | lastpathcomponent 167 | 168 | onlyshowifquerypopulated 169 | 170 | removeextension 171 | 172 | text 173 | {query} 174 | title 175 | Note created 176 | 177 | type 178 | alfred.workflow.output.notification 179 | uid 180 | 159A291E-3339-491E-8D3F-79091BE0319B 181 | version 182 | 1 183 | 184 | 185 | config 186 | 187 | concurrently 188 | 189 | escaping 190 | 4 191 | script 192 | property notesAccount : "" property notesFolder : "" 193 | property alwaysShow: false 194 | property workflowFolder : do shell script "pwd" property lib: load script POSIX file (workflowFolder & "/alfred_library.scpt") 195 | property wf: load script POSIX file (workflowFolder & "/q_workflow.scpt") 196 | property bundleid : "com.surrealroad.alfred-note" property cacheFile : "cache.plist" 197 | 198 | set wf to wf's new_workflow_with_bundle(bundleid) 199 | 200 | my alfred_script("{query}") on alfred_script(q) if q is "@@UPDATE@@" then open location lib's getVersionURL(bundleid) return end if --lib's setNotesActive() if q starts with "uid:" then set theUID to (characters 5 thru -1 of q) as string return else if q starts with "nclip:" then try set q to (characters 7 thru -1 of q) as string on error set q to "" end try set theResult to "Created note from clipboard: " & lib's noteFromClipboard(q, notesFolder, notesAccount, wf, alwaysShow) else 201 | if (count of paragraphs of q) is greater than 1 then set theBody to paragraphs 2 thru -1 of q 202 | else 203 | set theBody to "" end if lib's createNote(first paragraph of q, theBody, notesFolder, notesAccount, alwaysShow) set theResult to "Created note: " & q end if return theResult end alfred_script 204 | scriptargtype 205 | 0 206 | scriptfile 207 | 208 | type 209 | 6 210 | 211 | type 212 | alfred.workflow.action.script 213 | uid 214 | FFC9C9E2-2539-44FD-A081-41DE4D12210D 215 | version 216 | 2 217 | 218 | 219 | config 220 | 221 | concurrently 222 | 223 | escaping 224 | 4 225 | script 226 | property notesAccount : "" property notesFolder : "" 227 | property workflowFolder : do shell script "pwd" property lib: load script POSIX file (workflowFolder & "/alfred_library.scpt") 228 | property wf: load script POSIX file (workflowFolder & "/q_workflow.scpt") 229 | property bundleid : "com.surrealroad.alfred-note" property cacheFile : "cache.plist" 230 | 231 | set wf to wf's new_workflow_with_bundle(bundleid) 232 | 233 | my alfred_script("{query}") on alfred_script(q) if q is "@@UPDATE@@" then open location lib's getVersionURL(bundleid) return end if --lib's setNotesActive() if q starts with "uid:" then set theUID to (characters 5 thru -1 of q) as string return else if q starts with "nclip:" then try set q to (characters 7 thru -1 of q) as string on error set q to "" end try set theResult to "Created note from clipboard: " & lib's noteFromClipboard(q, notesFolder, notesAccount, wf, true) else if (count of paragraphs of q) is greater than 1 then set theBody to paragraphs 2 thru -1 of q 234 | else 235 | set theBody to "" end if lib's createNote(first paragraph of q, theBody, notesFolder, notesAccount, true) set theResult to "Created note: " & q end if return theResult end alfred_script 236 | scriptargtype 237 | 0 238 | scriptfile 239 | 240 | type 241 | 6 242 | 243 | type 244 | alfred.workflow.action.script 245 | uid 246 | 05A11783-4E0A-44F5-9EB3-D3CF6824EF1B 247 | version 248 | 2 249 | 250 | 251 | config 252 | 253 | alfredfiltersresults 254 | 255 | argumenttype 256 | 1 257 | escaping 258 | 4 259 | keyword 260 | nclip 261 | queuedelaycustom 262 | 1 263 | queuedelayimmediatelyinitially 264 | 265 | queuedelaymode 266 | 0 267 | queuemode 268 | 1 269 | runningsubtext 270 | Adds a new note to Notes.app from the clipboard 271 | script 272 | property notesAccount : "" property notesFolder : "" 273 | 274 | property workflowFolder : do shell script "pwd" property lib : load script POSIX file (workflowFolder & "/alfred_library.scpt") 275 | property wf : load script POSIX file (workflowFolder & "/q_workflow.scpt") 276 | property wfname : "Notes" 277 | property bundleid : "com.surrealroad.alfred-note" property uid : "add-clipnote" property addActionTitle : "Add Note from clipboard" 278 | 279 | set wf to wf's new_workflow_with_bundle(bundleid) 280 | set workflowFolder of lib to workflowFolder my alfred_script("{query}") on alfred_script(q) 281 | set theTitle to q 282 | 283 | set theBody to (the clipboard as Unicode text) if theTitle is not "" then set subtitle to "Create a new note from clipboard about " & theTitle else set subtitle to "Create a new note about " & first paragraph of theBody end if 284 | set addAction to lib's alfred_result_item(uid, addActionTitle, subtitle, "nclip:" & q, "yes") return lib's alfred_result_items({addAction}) end alfred_script 285 | scriptargtype 286 | 0 287 | scriptfile 288 | 289 | subtext 290 | Adds a new note to Notes.app from the clipboard 291 | title 292 | Add Note from Clipboard 293 | type 294 | 6 295 | withspace 296 | 297 | 298 | type 299 | alfred.workflow.input.scriptfilter 300 | uid 301 | A06E633A-6DA1-480D-9666-79AE7FA0E96B 302 | version 303 | 2 304 | 305 | 306 | config 307 | 308 | openwith 309 | 310 | sourcefile 311 | 312 | 313 | type 314 | alfred.workflow.action.openfile 315 | uid 316 | CE8709B4-F813-4766-982F-4BD872C7BF77 317 | version 318 | 3 319 | 320 | 321 | config 322 | 323 | anchorfields 324 | 325 | argumenttype 326 | 0 327 | daterange 328 | 0 329 | fields 330 | 331 | 332 | field 333 | kMDItemDisplayName 334 | not 335 | 336 | split 337 | 338 | value 339 | {query} 340 | words 341 | 342 | 343 | 344 | field 345 | kMDItemTextContent 346 | not 347 | 348 | split 349 | 350 | value 351 | {query} 352 | words 353 | 354 | 355 | 356 | includesystem 357 | 358 | keyword 359 | n 360 | runningsubtext 361 | 362 | scopes 363 | 364 | ~/Library/Containers/com.apple.Notes 365 | 366 | subtext 367 | Look for Notes.app notes 368 | title 369 | Search Notes 370 | types 371 | 372 | com.apple.notes.externalrecord 373 | 374 | withspace 375 | 376 | 377 | type 378 | alfred.workflow.input.filefilter 379 | uid 380 | 6903AA5D-B4EF-4B6A-837F-8FC842FD9721 381 | version 382 | 1 383 | 384 | 385 | readme 386 | To use, just type "n note_text" into Alfred. E.g. "n something very important I will probably forget" 387 | To create a note from the clipboard, type "nclip optional_note_name" 388 | 389 | This workflow will only work with iCloud-enabled Notes accounts. See the thread http://www.alfredforum.com/topic/1009-add-new-note/ for the alternate version 390 | 391 | Changelog: 392 | Tuesday, 5 July 2016 – Fix for nclip with custom title 393 | Thursday, 30 June 2016 – Updated for Alfred 3. Alfred 2 is no longer supported. 394 | Wednesday, 27 January 2016 – Fixed an issue with notes from clipboard not working; existing notes are now searched too (thanks, Vero!) 395 | Friday, 16 October 2015 – Split workflow to a new one that is iCloud-enabled 396 | Monday, 27 October 2014 – workaround for apple bug #18734006 on OS 10.10 397 | Monday, 13 October 2014 – Hold option to open note window after creation 398 | Tuesday, 17 September 2013 – Updated q_workflow module to latest version 399 | Thursday, 18 April 2013 – Only first line is used as a title when using "nclip" with no arguments 400 | Sunday, 7 April 2013 – Properly escape illegal characters in query 401 | Friday, 5 April 2013 – Fixed an issue where a temporary file was getting written to the wrong place, sorry about that! 402 | Thursday, 4 April 2013 – Combined into single workflow; renamed to "Notes"; fixed an issue with clip keyword; nclip now pastes HTML if possible; workflow will notify if updates are available 403 | Saturday, 16 March 2013 – First version 404 | 405 | Uses AppleScript implementation of the Workflow object class for Alfred 2 (https://github.com/qlassiqa/qWorkflow) 406 | uidata 407 | 408 | 05A11783-4E0A-44F5-9EB3-D3CF6824EF1B 409 | 410 | xpos 411 | 500 412 | ypos 413 | 180 414 | 415 | 159A291E-3339-491E-8D3F-79091BE0319B 416 | 417 | xpos 418 | 700 419 | ypos 420 | 60 421 | 422 | 6903AA5D-B4EF-4B6A-837F-8FC842FD9721 423 | 424 | xpos 425 | 300 426 | ypos 427 | 300 428 | 429 | A06E633A-6DA1-480D-9666-79AE7FA0E96B 430 | 431 | xpos 432 | 300 433 | ypos 434 | 180 435 | 436 | CE8709B4-F813-4766-982F-4BD872C7BF77 437 | 438 | xpos 439 | 500 440 | ypos 441 | 300 442 | 443 | F091FF34-55E2-45C1-ABD7-32DCA6578F3D 444 | 445 | xpos 446 | 300 447 | ypos 448 | 60 449 | 450 | FFC9C9E2-2539-44FD-A081-41DE4D12210D 451 | 452 | xpos 453 | 500 454 | ypos 455 | 60 456 | 457 | 458 | version 459 | 5 460 | webaddress 461 | http://www.surrealroad.com 462 | 463 | 464 | -------------------------------------------------------------------------------- /new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surrealroad/alfred-notes/7257536915fcf5a9bb24ba42fe720bcc61c5cd87/new.png -------------------------------------------------------------------------------- /q_workflow.applescript: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surrealroad/alfred-notes/7257536915fcf5a9bb24ba42fe720bcc61c5cd87/q_workflow.applescript -------------------------------------------------------------------------------- /q_workflow.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surrealroad/alfred-notes/7257536915fcf5a9bb24ba42fe720bcc61c5cd87/q_workflow.scpt -------------------------------------------------------------------------------- /workflow.scpt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surrealroad/alfred-notes/7257536915fcf5a9bb24ba42fe720bcc61c5cd87/workflow.scpt --------------------------------------------------------------------------------