                     action: Selector(item["action"] as String),
                     keyEquivalent: item["key"] as String)
                 menuItem.target = self
+                menuItem.tag = item["tag"] as? Int ?? 0
             }
             self.addItem(menuItem)
         }

        let dir = self.params["directory"] as String
        self.task.start("open " + dir + ";")
    }
}

    init(params: [String: AnyObject]) {
        super.init()
        
        self.delegate = self
        self.params = params
        self.initMenuItems()
        
