Hijack and Hacking the AppleScript Menu

HI, I am creating a Script that would look very nice if executed from its own menu. I have been trying to create this with applescript but with no luck. The only thing I have learned in the last 12 hours is that the menu items are stores in the folder: Menu Extras within the core services folder with the termination .menu. From all these menus the AppleScript menu is exactly what I need but with my own icon and my own Scripts located in my own folder. So, now I am trying to Hijack and Hack this .menu file. I have duplicated this file replace the Script.pdf icon and it works fine! I have my own menu with my own icon but I cant find were the path to the scripts folder is to replace it ¿ any idea?

You can only do this wen writing an agent in Objective-C/Cocoa, so it’s maybe possible to do with AppleScriptObjC too. Take a look at agents and it’s limited user interface possibilities. It’s done with the NSStatusItem object. It’s not very difficult to make, also make sure the application has the LSUIElement key enabled in the info.plist so the application will be launched as an agent and won’t show in your dock.

Thank you very much! I strongly think this solutions will be most appreciated by every AppleScript developer and fan! If I manage to do it I will post here everything to reproduce the menu! :smiley:

Hi, just to let everybody now that it was much faster, easier and legal to simple use Xcode! a few hours and know I am an expert! will star migrating project to Xcode! I still love AppleScript dont get me wrong! :smiley:

Everything is easier and simpler when the alternative is simply not possible :wink: