Re: Keynote document exporting option
Re: Keynote document exporting option
- Subject: Re: Keynote document exporting option
- From: Takaaki Naganoya <email@hidden>
- Date: Mon, 13 May 2019 22:47:06 +0900
Thanks NG for your confirmation!
I tried to run whole exporting script via “run script” command in vain, too.
I’ll report it to Bug reporter. If the OS maker knows it is a self-made
brand-new bug, and they have a willing to fix the bug, it may be repaired.
I think they does not make OS but bug.
--
Takaaki Naganoya
email@hidden
http://piyocast.com/as/
> 2019/05/13 20:41、Nigel Garvey <email@hidden>のメール:
>
> Takaaki Naganoya wrote on Sun, 12 May 2019 17:13:32 +0900:
>
>> Here is a sample script to export Keynote document as a movie file.
>>
>> https://iworkautomation.com/keynote/document-export.html
>>
>> Now, it does not work because of the enum “large” turned into “720p”
> and it
>> causes error.
>
> Hmm. :\ According to Keynote 9.0.2's dictionary, the possible 'movie
> format' values are now '360p', '540p', '720p', '1080p', '2160p', and
> 'native size'. The old values 'small', 'medium', and 'large' now compile
> to the first three of these, but none of the number+p expressions
> (re)compile once they're in the script text. Definitely a miscalculation
> on the part of the Keynote programmer.
>
> Here's a possible workaround. I haven't tried it in an exporting
> context, but it seems to return the required enums:
>
> on mfEnum(param) -- param can be either a text version of the required enum
> or a size integer,
> run script "on run args
> set theSize to item 1 of args as text
> tell app \"Keynote\"
> if (thesize begins with \"360\") or (thesize is \"small\") then
> return «constant KnmfKmf3»
> else if (thesize begins with \"540\") or (thesize is \"medium\") then
> return «constant KnmfKmf5»
> else if (thesize begins with \"720\") or (thesize is \"large\") then
> return «constant KnmfKmf7»
> else if (thesize begins with \"1080\") then
> return «constant KnmfKmf8»
> else if (thesize begins with \"2160\") then
> return «constant KnmfKmf4»
> else if (thesize begins with \"native\") then
> return «constant KnmfKmfN»
> end
> end
> end" with parameters {param}
> end mfEnum
>
> -- Demos:
> tell application "Keynote"
> {movie format:my mfEnum("720p")} --> {movie format:720p}
> {movie format:my mfEnum("large")} --> {movie format:720p}
> {movie format:my mfEnum(720)} --> {movie format:720p}
> {movie format:my mfEnum("native")} --> {movie format:native size}
> end tell
>
>
> NG
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden