Created
April 13, 2013 10:39
-
-
Save uhunkler/5377902 to your computer and use it in GitHub Desktop.
header - JSTalk Sketch
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
var doc = doc || null, | |
app = null, | |
extern = false; | |
if( doc === null ) | |
{ | |
extern = true; | |
app = JSTalk.application("Sketch"); | |
// app.activate(); | |
doc = app.orderedDocuments()[0]; | |
var selection = doc.selectedLayers(); | |
} | |
else | |
{ | |
app = NSApplication.sharedApplication(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With this "header" Sketch JSTalk scripts can be used from "within" Sketch via the plugin menu and from the "ouside" with for example the JSTalk Editor.