I have a similar issue trying to run “Update indexed items of all databases” from a smart rule. I have copied the original script to the smart rules folder and added the lines
on performSmartRule(theRecords)
end performSmartRule
The entire script is below. I keep getting the error-1708.
Any thoughts please?
Thanks Chris
– Update indexed items of all databases
– Created by Christian Grunenberg on Tue Mar 25 2014.
– Copyright (c) 2014. All rights reserved.
– Set to true if indexed items are not only located at the root of the database
property pAllRecords : false
on performSmartRule(theRecords)
tell application id “DNtp”
try
set theDatabases to databases
show progress indicator “Updating Indexed Items” steps (count of theDatabases)
repeat with theDatabase in theDatabases
step progress indicator (name of theDatabase as string)
set theRecords to records of theDatabase – Children of root
repeat with theRecord in theRecords
if pAllRecords or theRecord is indexed then
synchronize record theRecord – Updates children of theRecord too
end if
end repeat
end repeat
hide progress indicator
on error error_message number error_number
hide progress indicator
if the error_number is not -128 then display alert “DEVONthink” message error_message as warning
end try
end tell
end performSmartRule