Most recent edit on 2007-11-15 13:04:59 by GusMueller
Deletions:
delricdr
Edited on 2007-11-14 22:16:24 by LacacApaso
Additions:
delricdr
Edited on 2007-09-11 18:35:26 by GusMueller
Additions:
%%(python;QuickTiffSave.py)
Deletions:
%%(python;MakeGrayscale.py)
Oldest known version of this page was edited on 2007-09-11 18:35:14 by GusMueller []
Page view:
You can also write scripts to do something other than filter an image. For example- here's a script that'll save the current image as a tiff, and it also sets the
ACIsAction flag to true, so it'll show up in the File->Actions menu.
import objc, os
from Foundation import *
from AppKit import *
ACScriptSuperMenuTitle = None
ACScriptMenuTitle = "Quick save as TIFF"
ACShortcutKey = 'i'
ACShortcutMask = "command control"
ACIsAction = True
def main(image):
doc = NSDocumentController.sharedDocumentController().currentDocument()
data = doc.dataRepresentationOfType_('public.tiff')
filePath = doc.fileName().stringByDeletingPathExtension() + ".tiff"
# this will overwrite any file that may already be there
data.writeToFile_atomically_(filePath, True)
return None
Back to
AcornPlugins