2015-09-08 4 views
0

Привет, это яблочный скрипт, который находит и изменяет операцию в документе indesign. Но этот скрипт не выполняется и дает ошибку.Применить к только 1 текущему документу FInd и изменить

"Adobe InDesign CS6 got an error: Can’t set find text preferences of document 1 to nothing."

скрипт

tell application "Adobe InDesign CS6" 
    tell front document 
    set find text preferences to nothing 
    set change text preferences to nothing 
--Letter Z-- 
    set case sensitive of find change text options to true 
    set abbreviation to ".<005A>" 
    set thinspace to ". <005A>" 
    set find what of find text preferences to abbreviation 
    set change to of change text preferences to thinspace 
    change text 
    set find text preferences to nothing 
    set change text preferences to nothing 
    end tell 
end tell 

Пожалуйста, предложите любой из.

Это должно работать только для открытого документа. когда передний документ удален, этот сценарий запускается.

Я не смог разобраться с ошибкой.

ответ

0

find text preferences и change text preferences принадлежат к приложению, а не к документу. Попробуйте это

tell application "Adobe InDesign CS6" 
    if (count documents) is 0 then return 
    set find text preferences to nothing 
    set change text preferences to nothing 

    set case sensitive of find change text options to true 
    set abbreviation to ".<005A>" 
    set thinspace to ". <005A>" 
    set find what of find text preferences to abbreviation 
    set change to of change text preferences to thinspace 
    tell document 1 
     change text 
    end tell 
    set find text preferences to nothing 
    set change text preferences to nothing 
end tell 
+0

Да Вадиан. Его работаю Спасибо. –

+1

Добро пожаловать. Если на ваш вопрос ответили, примите ответ – vadian

Смежные вопросы