Create a new image with a size set to 800x450
This plugin will make a new image with the dimensions 800x450. It works by setting a "last size" variable in the user defaults, which the default image document looks for when making new documents. It also sets
ACIsAction to True, so it will show up in the File/Actions menu.
import objc, os, math
from Foundation import *
from AppKit import *
ACScriptSuperMenuTitle = None
ACScriptMenuTitle = "New image 800x450"
ACIsAction = True
def main(image):
size = NSStringFromSize((800, 450))
NSUserDefaults.standardUserDefaults().setObject_forKey_(size, 'lastSize')
NSDocumentController.sharedDocumentController().newDocument_(None)
# we're not changing the image, so we'll return nothing to put on
return None
Back to
AcornPlugins