I have a smart rule that runs on import to a specific group (i.e., its set to run on import and searches that group).
It runs when I import a document to the group manually, but not when I import it via AppleScript. Any idea why?
I have a smart rule that runs on import to a specific group (i.e., its set to run on import and searches that group).
It runs when I import a document to the group manually, but not when I import it via AppleScript. Any idea why?
Those who know about Apple Script will want to see the it.
set importedRecords to import fileAlias to targetGroup
Smart rules don’t trigger on AppleScript imports.
This is by design. Scripts don’t trigger smart rules by default – you need to use the perform smart rule command.
Many thanks. Is there a smart rule that will trigger on an AppleScripted import? I don’t mind if it triggers on other things, if I can confine it to a special import folder.
(I’m trying to avoid having the script trigger it as I want to separate out the two systems differently)
The AppleScript command is also able to trigger only a certain rule, see its parameters in the Script Editor.app
I don’t understand. Do you want the script to trigger a smart rule or not?
Take a look in the scripting dictionary like cgrunenberg just suggested.
If you want help, please provide enough context and details for other people to understand the situation and your goal.
And please post the full script – the one line you shared doesn’t tell us much.
(When you do, enclose the script in three backticks, ``` on the line before and after. That way it is formatted properly as a code block.)