I would like to insert an image in a “image view”, but I do not use a document image, I recover the image, as “picture” format, resulting from the “clipboard”…
How do I have to make to insert and display this image in the “image view”?
For exemple :
set myImage to (the clipboard as picture)
--> «data PICT01100031000E00370013001102FF0C00FFF ... 00CC0088BBFCC000FF»
tell window of theObject to set image of image view "myImage" to myImage
--> error ...
I did not find any solution for the moment…
Would somebody have a solution to propose me?
Thank you…
Model: eMac
AppleScript: 1.9.3, XCode : 1.5
Operating System: Mac OS X (10.3.8)
I think you have to do a little Obj-C and then call that from your AppleScript. If you add an Obj-C class called “Methods” (don’t create the header file) and paste this into it (replace the complete contents of the file):
Then you could call it from AppleScript like so:
set preferred type of pasteboard 1 to "pict image"
call method "setImageToPasteboard:withPastboard:" of class "Methods" with parameters {image view "myImage" of window of theObject, pasteboard 1}