Run Mail rules on a specific mailbox?

Is it possible to make AppleScript run a rule I have setup in Mail on a specific folder/mailbox? (Not the Inbox.)

I have a question, if your messages are coming in your inbox first, then you move them to the mailbox in question, why don’t you apply your rule from your inbox and then in your rule, move the message to the mailbox you want.

No, they don’t arrive at the inbox first. They’re moved to a different folder with a server side rule before they reach the inbox.
The rule I want to run on some of the emails delivered to this folder can’t be run sever side (e.g. AppleScript).