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
-- Change first selected node to heading, | |
-- or deepen level if already heading | |
-- DEV 1.1 Script | |
property pstrType : "heading" | |
on run | |
tell application "FoldingText" | |
-- CHECK THAT THERE IS A DOCUMENT |
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
-- Permission is hereby granted, free of charge, | |
-- to any person obtaining a copy of this software | |
-- and associated documentation files (the "Software"), | |
-- to deal in the Software without restriction, | |
-- including without limitation the rights to use, copy, | |
-- modify, merge, publish, distribute, sublicense, | |
-- and/or sell copies of the Software, and to permit persons | |
-- to whom the Software is furnished to do so, | |
-- subject to the following conditions: |
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
-- Copyright (C) 2012 Robin Trew | |
-- | |
-- Permission is hereby granted, free of charge, | |
-- to any person obtaining a copy of this software | |
-- and associated documentation files (the "Software"), | |
-- to deal in the Software without restriction, | |
-- including without limitation the rights to use, copy, | |
-- modify, merge, publish, distribute, sublicense, | |
-- and/or sell copies of the Software, and to permit persons |
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
-- Copyright (C) 2012 Robin Trew | |
-- | |
-- Permission is hereby granted, free of charge, | |
-- to any person obtaining a copy of this software | |
-- and associated documentation files (the "Software"), | |
-- to deal in the Software without restriction, | |
-- including without limitation the rights to use, copy, | |
-- modify, merge, publish, distribute, sublicense, | |
-- and/or sell copies of the Software, and to permit persons | |
-- to whom the Software is furnished to do so, |
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
// Ver 0.4 Rob Trew | |
// Library for using OSX Yosemite Script Editor scripts | |
// written in an idiom compatible with FoldingText, Drafts, 1Writer, TextWell | |
// In iOS Drafts 4 scripts, the header is simply: | |
// var drafts = this; | |
// For headers for FoldingText and other editors, see: | |
// See: http://support.foldingtext.com/t/writing-scripts-which-run-on-both-foldingtext-and-ios-drafts-4/652/7 | |
// Call functions, after this header, with the prefix: | |
// drafts. |
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
// ROBIN TREW 2015 MIT License | |
// OSX 10.10 SCRIPT EDITOR – TOGGLE COMMENTS | |
// Add remove '// ' from before printing characters | |
// Depends on a library .scpt being saved at ~/Library/Script Libraries/DraftsSE.scpt | |
// See: See: http://support.foldingtext.com/t/writing-scripts-which-run-on-both-foldingtext-and-ios-drafts-4/652/7 | |
// INCLUDE LIBRARY OF IOS DRAFTS-COMPATIBLE EDITOR FUNCTIONS: |
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
// ROBIN TREW 2015 MIT License | |
// OSX 10.10 SCRIPT EDITOR – INDENT SELECTED LINES (with Tab or 4 spaces) | |
// Add remove '// ' from before printing characters | |
// Depends on a library .scpt being saved at ~/Library/Script Libraries/DraftsSE.scpt | |
// See: See: http://support.foldingtext.com/t/writing-scripts-which-run-on-both-foldingtext-and-ios-drafts-4/652/7 | |
// INCLUDE ALL OR PART OF LIBRARY OF IOS DRAFTS-COMPATIBLE EDITOR FUNCTIONS: |
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
// ROBIN TREW 2015 MIT License | |
// OSX 10.10 SCRIPT EDITOR – REDUCE INDENTATION OF SELECTED LINES (by Tab or 4 spaces) | |
// Add remove '// ' from before printing characters | |
// Depends on a library .scpt being saved at ~/Library/Script Libraries/DraftsSE.scpt | |
// See: See: http://support.foldingtext.com/t/writing-scripts-which-run-on-both-foldingtext-and-ios-drafts-4/652/7 | |
// INCLUDE ALL OR PART OF LIBRARY OF IOS DRAFTS-COMPATIBLE EDITOR FUNCTIONS: |
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
// ROBIN TREW 2015 MIT License | |
// OSX 10.10 SCRIPT EDITOR – WRAP SELECTED LINE(S) IN SIMPLE TIMING CODE (FOR PERFORMANCE EXPERIMENTS) | |
// Add remove '// ' from before printing characters | |
// Depends on a library .scpt being saved at ~/Library/Script Libraries/DraftsSE.scpt | |
// See: See: http://support.foldingtext.com/t/writing-scripts-which-run-on-both-foldingtext-and-ios-drafts-4/652/7 | |
// INCLUDE LIBRARY OF IOS DRAFTS-COMPATIBLE EDITOR FUNCTIONS: |
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
// PARSE LOCAL OPML FILE IN OS X 10.10 JXA USING $.NSXMLDocument | |
// Ver 2.0 Parse all attributes (ver 1 just parsed text) | |
function run() { | |
var app = Application.currentApplication(); | |
app.includeStandardAdditions = true; | |
function readTextFromFile(strPath) { | |
return $.NSString.stringWithContentsOfFile(strPath); | |
} | |
OlderNewer