Tuesday, November 19, 2019

#1 2019-10-13 09:01:13 am

Karstenj1
Member
Registered: 2019-07-11
Posts: 7

some image files won't insert into keynote

This simple script works for some image files and not for others and I can't figure out why:

Applescript:

tell application "Keynote"
   tell document 1
       tell current slide
           make new image with properties {file:"Macintosh HD:Users:karstenkamps:GESCHÄFT:IT:Automatisierung:Bilder:Google Slides:2 Makrolage.png"}
       end tell
   end tell
end tell

I've tried .jpg files, other .png files. I have one png file that works. The error message I get is (translated from German):

--> error "Nicht unterstütztes Objekt." number -2763


"not supported object/file" in English I suppose.

The files are simple screenshots or sometimes larger image files. They all work manually with cut and paste. If an image is larger than the size of the slide, it works manually. If the image is smaller than the siez of the slide, it works with that one file but not with the others. 

My keynote version is the newest, 9.2.

Anyone any idea?

Offline

 

#2 2019-10-14 03:09:36 am

Yvan Koenig
Member
Registered: 2006-09-14
Posts: 3635

Re: some image files won't insert into keynote

Are you sure that the file is really a png one?

Run the script :

Applescript:

set thefile to "Macintosh HD:Users:karstenkamps:GESCHÄFT:IT:Automatisierung:Bilder:Google Slides:2 Makrolage.png" as «class furl»
set signature to read thefile from 2 for 3

display dialog "the file is flagged as : " & signature & " one."

If it's a png you will read : "the file is flagged as : PNG one."

I encountered some files whose extension was png but which were a sit version of the image.


Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) lundi 14 octobre 2019  11:07:48

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)