[Pythonmac-SIG] appscript = creating variables of basic k. types
Benjamin Golder
benjamin.j.golder at gmail.com
Mon Feb 28 00:11:29 CET 2011
Hello,
I'm learning and enjoying the appscript module, but I'm a little confused
about how to instantiate basic k. type objects.
for example, if I want to create a variable that holds a k.boolean value to
use while scripting an application,
how do I create it, and then pass it to the set() method of a property
within that application?
let's say I'm scripting Adobe Illustrator:
il = app('Adobe Illustrator')
doc = il.current_document.get()
layers = doc.layers.get()
layer = layers[1]
in Illustrator, a layer object has a property layer.visible, which has a
k.boolean value.
how do I create a variable m which is a k.boolean type, such that:
layer.visible.set(m)
will set the .visible property to a different k.boolean value?
m = k.boolean(True) doesn't work
m = make(new k.boolean) doesn't work
there must be a simple answer, but I don't know it.
Any and all help or advice is appreciated, thanks!!
-Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20110227/1f7422ab/attachment.html>
More information about the Pythonmac-SIG
mailing list