2022-02-22 05:52:09 +00:00
|
|
|
//
|
|
|
|
// ScriptAdditions.m
|
|
|
|
// Cog
|
|
|
|
//
|
|
|
|
// Created by Christopher Snowhill on 2/21/22.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
|
|
|
|
#import "AppController.h"
|
|
|
|
|
|
|
|
@implementation NSApplication (APLApplicationExtensions)
|
|
|
|
- (id)playbackStart:(NSScriptCommand *)command {
|
|
|
|
[(AppController *)[NSApp delegate] clickPlay];
|
2022-06-17 13:39:02 +00:00
|
|
|
return @(YES);
|
2022-02-22 05:52:09 +00:00
|
|
|
}
|
|
|
|
- (id)playbackPause:(NSScriptCommand *)command {
|
|
|
|
[(AppController *)[NSApp delegate] clickPause];
|
2022-06-17 13:39:02 +00:00
|
|
|
return @(YES);
|
2022-02-22 05:52:09 +00:00
|
|
|
}
|
|
|
|
- (id)playbackStop:(NSScriptCommand *)command {
|
|
|
|
[(AppController *)[NSApp delegate] clickStop];
|
2022-06-17 13:39:02 +00:00
|
|
|
return @(YES);
|
2022-02-22 05:52:09 +00:00
|
|
|
}
|
|
|
|
- (id)playbackPrevious:(NSScriptCommand *)command {
|
|
|
|
[(AppController *)[NSApp delegate] clickPrev];
|
2022-06-17 13:39:02 +00:00
|
|
|
return @(YES);
|
2022-02-22 05:52:09 +00:00
|
|
|
}
|
|
|
|
- (id)playbackNext:(NSScriptCommand *)command {
|
|
|
|
[(AppController *)[NSApp delegate] clickNext];
|
2022-06-17 13:39:02 +00:00
|
|
|
return @(YES);
|
2022-02-22 05:52:09 +00:00
|
|
|
}
|
|
|
|
@end
|