Started creation of Autotype out of normalized command strings

This commit is contained in:
michael starke
2014-02-19 19:45:00 +01:00
parent 24d0c3a6ee
commit 7f16310a4d
8 changed files with 69 additions and 16 deletions

View File

@@ -7,17 +7,32 @@
//
#import "MPAutotypeCommand.h"
#import "NSString+Commands.h"
#import "MPAutotypeContext.h"
#import "MPKeyMapper.h"
#import "NSString+Commands.h"
#import <Carbon/Carbon.h>
@implementation MPAutotypeCommand
+ (NSArray *)commandsForContext:(MPAutotypeContext *)context {
NSError *error;
NSRegularExpression *regularExpression = [[NSRegularExpression alloc] initWithPattern:@"" options:0 error:&error];
if([context isValid]) {
return nil;
}
BOOL outsideCommand = YES;
NSInteger currentIndex;
while(YES) {
if(outsideCommand) {
NSRange openingBracketRange = [context.normalizedCommand rangeOfString:@"{"];
if(openingBracketRange.location != NSNotFound && openingBracketRange.length == 1) {
}
}
else {
}
}
return nil;
}