• 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: Mac InDesign CS5.5 & fonts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mac InDesign CS5.5 & fonts


  • Subject: Re: Mac InDesign CS5.5 & fonts
  • From: Yvan KOENIG <email@hidden>
  • Date: Fri, 26 Jun 2015 11:54:06 +0200


Le 26/06/2015 à 11:39, 2551 <email@hidden> a écrit :


On 26 Jun 2015, at 01:50, Houston, Brad <email@hidden> wrote:

Though the error includes the name...I cannot seem to get an inactive font’s name in any form (family, style, full, native, etc). Even if I can’t replace it I would like to record that font X was skipped.

I understand you solved your problem, but I wanted to pass on a trick Yvan showed me on this list some time ago which I've employed fruitfully dozens of times since. Whenever you get an error message containing the information you want but which doesn't seem accessible, you can always salvage the information in that error message and use it elsewhere in your script. Sometimes, you might want to deliberately throw an error if that's the only way you can get the information into a variable. Simple example:

set m to ""
try
tell application "Finder" to get the name of someDiskThatDoesntExist
on error errmsg
set m to text of errmsg
end try
words of m

Result:

{"The", "variable", "someDiskThatDoesntExist", "is", "not", "defined"}



Best

Phil

Here is a handler which I used for years with iWork '09.
#=====
(*
set { leDocument, laFeuille, laTable, lIntervalle} to my getSelection()
*)
on getSelection()
local _, l_Intervalle, la_Table, la_Feuille, le_document, errmsg, ernum_Ligne


tell application "/Applications/iWork '09/Numbers.app" to tell document 1
repeat with i from 1 to the count of every sheet
tell sheet i
set x to the count of every table
if x > 0 then
repeat with y from 1 to x
try
(selection range of table y) as text
on error errmsg number ernum_Ligne
set {_, l_Intervalle, _, la_Table, _, la_Feuille, _, le_document} to my decoupe(errmsg, quote)
return {le_document, la_Feuille, la_Table, l_Intervalle}
end try
end repeat -- y
end if -- x>0
end tell -- sheet
end repeat -- i
end tell -- document
return {missing value, missing value, missing value, missing value}
end getSelection

#=====

on decoupe(t, d)
local oTIDs, l
set {oTIDs, AppleScript's text item delimiters} to {AppleScript's text item delimiters, d}
set l to text items of t
set AppleScript's text item delimiters to oTIDs
return l
end decoupe

#=====

 _______________________________________________
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: 
 >Mac InDesign CS5.5 & fonts (From: "Houston, Brad" <email@hidden>)
 >Re: Mac InDesign CS5.5 & fonts (From: 2551 <email@hidden>)

  • Prev by Date: Re: Mac InDesign CS5.5 & fonts
  • Next by Date: Re: Double Tell - Tell by Variable Question
  • Previous by thread: Re: Mac InDesign CS5.5 & fonts
  • Next by thread: Re: Mac InDesign CS5.5 & fonts
  • Index(es):
    • Date
    • Thread