REFERENCES FOR LEARNING & USING APPLESCRIPT Modified: 2018/06/19 18:47
AppleScript is a rather peculiar scripting language to learn.
// | |
// BonjourPublisher.swift | |
// BonjourTest | |
// | |
// Created by Dov Frankel on 10/12/15. | |
// Copyright © 2015 Dov Frankel. All rights reserved. | |
// | |
import Foundation |
#!/usr/bin/osascript -l JavaScript | |
var iTerm = Application("iTerm"); | |
iTerm.includeStandardAdditions = true; | |
iTerm.activate() | |
var new_win = function() { | |
var myNewWindow = iTerm.createWindowWithDefaultProfile({command: "/bin/bash"}); | |
// https://github.com/gnachman/iTerm2/search?q=iTermNewWindowCommand | |
console.log("New window created: " + Automation.getDisplayString(myNewWindow, true)); | |
return myNewWindow; |
// | |
// CollectionViewListLayout.swift | |
// money | |
// | |
// Created by Robert Dougan on 29/09/15. | |
// Copyright © 2015 Phyn3t. All rights reserved. | |
// | |
import Cocoa |
# Swift | |
command alias uikit expr import UIKit | |
command alias foundation expr import Foundation | |
command alias vh expr -l objc++ -O -- [[[UIWindow keyWindow] rootViewController] _printHierarchy] | |
# Objective-C | |
command alias uikitc expr @import UIKit | |
command alias foundationc expr @import Foundation | |
command alias vhc po [[[UIWindow keyWindow] rootViewController] _printHierarchy] |
import CoreData | |
protocol Fetchable | |
{ | |
typealias FetchableType: NSManagedObject | |
static func entityName() -> String | |
static func objectsInContext(context: NSManagedObjectContext, predicate: NSPredicate?, sortedBy: String?, ascending: Bool) throws -> [FetchableType] | |
static func singleObjectInContext(context: NSManagedObjectContext, predicate: NSPredicate?, sortedBy: String?, ascending: Bool) throws -> FetchableType? | |
static func objectCountInContext(context: NSManagedObjectContext, predicate: NSPredicate?) -> Int |
// | |
// PasteboardWatcher.swift | |
// PasteboardWatcher | |
// | |
// Created by Devarshi Kulshreshtha on 6/19/15.PasteboardWatcher | |
// Copyright © 2015 Devarshi Kulshreshtha. All rights reserved. | |
// | |
import Cocoa |
// | |
// DragAndDropImageView.swift | |
// Iconizer | |
// https://github.com/raphaelhanneken/iconizer | |
// | |
import Cocoa | |
class DragDropImageView: NSImageView, NSDraggingSource { | |
/// Holds the last mouse down event, to track the drag distance. |
import Foundation | |
let locale = NSLocale(localeIdentifier: "ru_RU") | |
let dateFormatter = NSDateFormatter() | |
dateFormatter.timeStyle = .ShortStyle | |
dateFormatter.dateStyle = .MediumStyle | |
dateFormatter.locale = locale | |
dateFormatter.doesRelativeDateFormatting = true |
#!/bin/bash | |
#Creates an iOS OTA (Over the Air) Minifest File | |
URL="https://sywl.theappguy.guru/relayrunner/0.2.6/RunnerApp_0.2.6ent.ipa" | |
BUNDLE_ID="com.example.yourbundleid" | |
BUNDLE_VERSION="0.0.1" | |
TITLE="Your App Name" | |
FILE="yourmanifestfile.plist" |