-
Notifications
You must be signed in to change notification settings - Fork 406
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added applescript support for a "search" command
- Loading branch information
Showing
5 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd"> | ||
<dictionary title=""> | ||
<suite name="Notational Velocity Scripting" code="nvss" | ||
description="Commands and classes for Notational Velocity Scripting"> | ||
<command name="search" code="nvsssrch" description="Perform a search"> | ||
<cocoa class="SearchCommand"/> | ||
<direct-parameter> | ||
<type type="text" name="searchTerm"/> | ||
</direct-parameter> | ||
</command> | ||
</suite> | ||
</dictionary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// SearchCommand.h | ||
// Notation | ||
// | ||
// Created by Greg D Bell on 9-5-10. | ||
// Copyright 2010 Orange Peel Media Ltd. All rights reserved. | ||
// | ||
|
||
#import <Cocoa/Cocoa.h> | ||
|
||
|
||
@interface SearchCommand : NSScriptCommand { | ||
|
||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// | ||
// SearchCommand.m | ||
// Notation | ||
// | ||
// Created by Greg D Bell on 9-5-10. | ||
// Copyright 2010 Orange Peel Media Ltd. All rights reserved. | ||
// | ||
|
||
#import "SearchCommand.h" | ||
#import "AppController.h" | ||
|
||
@implementation SearchCommand | ||
|
||
- (id)performDefaultImplementation | ||
{ | ||
NSString *searchTerm = [self directParameter]; | ||
[(AppController *)[NSApp delegate] searchForString:searchTerm]; | ||
return self; | ||
} | ||
|
||
@end |