Automatically forward "Starred in Gmail" messages to OmniFocus
Try:

function TJ() {
  var threads = GmailApp.search('label:inbox is:starred');
  for (var h = 0; h &lt; threads.length; h++) {
    var messages = threads[h].getMessages();
    for (var i = 0; i &lt; messages.length; i++) {
      if (messages[i].isStarred())
      {
        Logger.log(messages[i].getSubject());
        messages[i].unstar();
        messages[i].forward("recipient1@example.com", {
          // Advanced parameters: https://developers.google.com/apps-script/reference/gmail/gmail-message#forward%28String,Object%29
          cc: "myboss@example.com",
          bcc: "mybosses-boss@example.com,vp@example.com"
          });     
      }
  }
}
}


For more information regarding Google Apps Script, see this post:
http://www.johneday.com/422/time-based-gmail-filters-with-google-apps-script