136 lines
4.3 KiB
XML
136 lines
4.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>AMApplicationBuild</key>
|
|
<string>419</string>
|
|
<key>AMApplicationVersion</key>
|
|
<string>2.6</string>
|
|
<key>AMDocumentVersion</key>
|
|
<string>2</string>
|
|
<key>actions</key>
|
|
<array>
|
|
<dict>
|
|
<key>action</key>
|
|
<dict>
|
|
<key>AMAccepts</key>
|
|
<dict>
|
|
<key>Container</key>
|
|
<string>List</string>
|
|
<key>Optional</key>
|
|
<true/>
|
|
<key>Types</key>
|
|
<array>
|
|
<string>com.apple.applescript.object</string>
|
|
</array>
|
|
</dict>
|
|
<key>AMActionVersion</key>
|
|
<string>1.0</string>
|
|
<key>AMApplication</key>
|
|
<array>
|
|
<string>Automator</string>
|
|
</array>
|
|
<key>AMParameterProperties</key>
|
|
<dict>
|
|
<key>source</key>
|
|
<dict/>
|
|
</dict>
|
|
<key>AMProvides</key>
|
|
<dict>
|
|
<key>Container</key>
|
|
<string>List</string>
|
|
<key>Types</key>
|
|
<array>
|
|
<string>com.apple.applescript.object</string>
|
|
</array>
|
|
</dict>
|
|
<key>ActionBundlePath</key>
|
|
<string>/System/Library/Automator/Run JavaScript.action</string>
|
|
<key>ActionName</key>
|
|
<string>Run JavaScript</string>
|
|
<key>ActionParameters</key>
|
|
<dict>
|
|
<key>source</key>
|
|
<string>var workspace = Library("workspace")
|
|
var app = Application.currentApplication()
|
|
app.includeStandardAdditions = true
|
|
|
|
var response = app.displayDialog("Enter Name for New Workspace", {
|
|
defaultAnswer: "",
|
|
withIcon: "note",
|
|
buttons: ["Cancel", "Continue"],
|
|
defaultButton: "Continue"
|
|
})
|
|
|
|
var selectedWorkspaceName = response.textReturned
|
|
|
|
var allWorkspaceNames = workspace.getNames()
|
|
|
|
for (var i = 0; i < allWorkspaceNames.length; i++) {
|
|
if(allWorkspaceNames[i] == selectedWorkspaceName){
|
|
var response = app.displayDialog(" Workspace name already used. Please choose another", {
|
|
defaultAnswer: "",
|
|
withIcon: "note"
|
|
})
|
|
}
|
|
}
|
|
|
|
var selectedWorkspaceProps = { Safari: [] }
|
|
workspace.saveProperties(selectedWorkspaceName, selectedWorkspaceProps)
|
|
|
|
workspace.addNewWindowTo(selectedWorkspaceName)
|
|
|
|
// Result: {"buttonReturned":"Continue", "textReturned":"Jen"}
|
|
// app.displayDialog("Hello, " + (response.textReturned) + ".")</string>
|
|
</dict>
|
|
<key>BundleIdentifier</key>
|
|
<string>com.apple.Automator.RunJavaScript</string>
|
|
<key>CFBundleVersion</key>
|
|
<string>1.0</string>
|
|
<key>CanShowSelectedItemsWhenRun</key>
|
|
<false/>
|
|
<key>CanShowWhenRun</key>
|
|
<true/>
|
|
<key>Category</key>
|
|
<array>
|
|
<string>AMCategoryUtilities</string>
|
|
</array>
|
|
<key>Class Name</key>
|
|
<string>RunJavaScriptAction</string>
|
|
<key>InputUUID</key>
|
|
<string>FBE6C993-52EE-41D0-BD21-930E380F6DDF</string>
|
|
<key>Keywords</key>
|
|
<array>
|
|
<string>Run</string>
|
|
<string>JavaScript</string>
|
|
</array>
|
|
<key>OutputUUID</key>
|
|
<string>B523AC97-AB88-4C3B-9AD9-7A312D268481</string>
|
|
<key>UUID</key>
|
|
<string>209EE2EE-6708-4074-A81D-C22F65CAC830</string>
|
|
<key>UnlocalizedApplications</key>
|
|
<array>
|
|
<string>Automator</string>
|
|
</array>
|
|
<key>arguments</key>
|
|
<dict>
|
|
<key>0</key>
|
|
<dict>
|
|
<key>default value</key>
|
|
<string>function run(input, parameters) {
|
|
|
|
// Your script goes here
|
|
|
|
return input;
|
|
}</string>
|
|
<key>name</key>
|
|
<string>source</string>
|
|
<key>required</key>
|
|
<string>0</string>
|
|
<key>type</key>
|
|
<string>0</string>
|
|
<key>uuid</key>
|
|
<string>0</string>
|
|
</dict>
|
|
</dict>
|
|
<key>isViewVisible</key>
|
|
<true/>
|
|
<key>location</key>
|
|
<string>309.000000:316.000000</string>
|
|
<key>nibPath</key>
|
|
<string>/System/Library/Automator/Run JavaScript.action/Contents/Resources/Base.lproj/main.nib</string>
|
|
</dict>
|
|
<key>isViewVisible</key>
|
|
<true/>
|
|
</dict>
|
|
</array>
|
|
<key>connectors</key>
|
|
<dict/>
|
|
<key>workflowMetaData</key>
|
|
<dict>
|
|
<key>serviceApplicationBundleID</key>
|
|
<string>com.apple.Safari</string>
|
|
<key>serviceApplicationPath</key>
|
|
<string>/Applications/Safari.app</string>
|
|
<key>serviceInputTypeIdentifier</key>
|
|
<string>com.apple.Automator.nothing</string>
|
|
<key>serviceOutputTypeIdentifier</key>
|
|
<string>com.apple.Automator.nothing</string>
|
|
<key>serviceProcessesInput</key>
|
|
<integer>0</integer>
|
|
<key>workflowTypeIdentifier</key>
|
|
<string>com.apple.Automator.servicesMenu</string>
|
|
</dict>
|
|
</dict>
|
|
</plist>
|