I'm trying to create a basic status menu app with Platypus.app
I feel I'm almost there but I can't get there and it's been puzzling for a week now.
#!/usr/bin/perl
# If 0 arguments, we show menu
if (!scalar(@ARGV)) {
print "MENUITEMICON|AppIcon.icns|~/Desktop\n";
print "MENUITEMICON|/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns|~/Desktop/3DProjects\n";
print "MENUITEMICON|https://sveinbjorn.org/images/andlat.png|~/Desktop/2DProjects\n";
print "SUBMENU|Submenu|Item 1|Item 2|Item 3\n";
} else {
# We get the menu title as an argument
system("open $ARGV[0]");
}
This works if I use the relative path as the menu name, but that doesn't look good. How do I use Open Desktop, Open 3DProjects etc as the menu and have it open the correct folder?
Also, is it possible to add an icon to the submenu items?
Can you try save the absolute path in the script like this: