• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Scripting iBooks Author (iAuthor)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting iBooks Author (iAuthor)


  • Subject: Re: Scripting iBooks Author (iAuthor)
  • From: "koenig.yvan" <email@hidden>
  • Date: Sun, 07 Jul 2013 16:14:02 +0200


Le 07/07/2013 à 14:29, Robert Poland <email@hidden> a écrit :

Hi,

I'm trying to script iBooks Author.

My current problem is around Window 1.

The dictionary says "window n [inh. item] : A window.".

The part "[inh. item]" is different than other apps. Does this have a connection to why I can't do a tell window 1?

TIA,


Hello Robert

I am able to get the properties of every documents but can't get other datas.

tell application "iBooks Author"
activate
count every window
--> 0
try
properties of window 1
--> error number -1719 from window 1
end try
name of document 1
--> "maybe.iba"
tell document result
try
properties of text
on error errMsg number errNbr
log errNbr & " ,  " & errMsg
(*-1728,  ,  , Il est impossible d’obtenir properties of text.*)
end try
end tell
end tell

In Pages text is a property of body text or a property of a text box.
Alas body text and text box aren't defined in iBooks Author dictionary.

tell application "Pages"
activate
count every window
--> 1
properties of window 1
--> {document:document id 11711747, closeable:true, zoomable:true, thumbnails visible:false, zoomed:false, floating:false, styles visible:true, ruler visible:true, class:window, modal:false, two up:false, bounds:{1310, 745, 1996, 1798}, toolbar visible:true, id:326, visible:true, index:1, full screen:false, miniaturizable:true, name:"Danielle Messia.pages", fit width:false, resizable:true, miniaturized:false, outline visible:false, view scale:110.0, titled:true, visible pages:{page 7 of document id 11711747, page 8 of document id 11711747}, fit page:false}
tell document 1
name
--> "Danielle Messia.pages"
try
properties of text
on error errMsg number errNbr
log errNbr & " ,  " & errMsg
(*-1728,  ,  , Il est impossible d’obtenir properties of text.*)
end try
properties of body text
(* {text indent:0.0, collapsed:false, underline color:missing value, strikethrough color:missing value, paragraph style:paragraph style "le corps" of document id 11711747, color:{0, 0, 0}, number label tiered:false, class:Unicode text, prevent widows and orphans:true, subscript:false, character style:missing value, list style:list style "Aucun" of document id 11711747, superscript:false, label type:none, space before:0.0, remove hyphenation:false, line spacing:1.0, baseline shift:0.0, shadow:false, label indent:0.0, contents:"De la main gauche

Je t´écris de la main gauche
Celle qui n´a jamais parlé
Elle hésite, est si gauche
Que je l´ai toujours cachée
…"
*)
properties of every paragraph of body text
properties of text box 1
properties of every character of object text of text box 1
end tell
end tell

It seems that those who designed this application's AppleScript support were deeply asleep.

KOENIG Yvan (VALLAURIS, France) dimanche 7 juillet 2013 16:10:23



 _______________________________________________
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

References: 
 >Scripting iBooks Author (iAuthor) (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: Scripting iBooks Author (iAuthor)
  • Next by Date: Re: Scripting iBooks Author (iAuthor)
  • Previous by thread: Re: Scripting iBooks Author (iAuthor)
  • Next by thread: Passing Return-Delimited Text to UNIX Sort
  • Index(es):
    • Date
    • Thread