Services Menu + MBS

I’m trying to modify the MBS TestServices Services Menu to get a list of files selected in the Finder, or let the app know to check for selected files in the Finder.

I know I have to modify the info.plist and data.plist files, but the results always end up in the General Services instead of Files and Folders, and nothing shows up in the Services Menu when I select a file and right-click.

Is there some other pasteboard type I’m supposed to use? NSFilenamesPboardType is deprecated. NSPasteboardTypeURL and NSPasteboardTypeFileURL both end up in General Services instead of Files and Folders, and neither one shows up in Services menu when you have a file selected and right click.

Screenshot 2024-11-07 at 11.00.55 AM

Not that this answers your question, but isn’t Shift+Command+Q for logging out of macOS?

1 Like

At the time the TestServices app was written, ⌘⇧Q probably wasn’t reserved for Logging Out. In the original version of the app, it was used for Quoting Text. - it copied highlighted text from other spruces into the textarea in the TestServices app.

1 Like

Nice to see someone using this class.

You may check for other applications plist on how they declare their items.
I would expect NSFilenamesPboardType will work for many more years.

I used some plist info from Transmit, and it seems to be working. It really takes a while for the new items to show up in the Services menu (or be removed from it).

I made changes last night, wasn’t seeing them in the Services menu, gave up and went to sleep. This morning when I checked they were showing up.

Is there some way to force Services to refresh/update so things show up right away?

Have you tried turning the computer off and on again?

I rebooted, and now it’s updating with each change, and I’m getting the UserData so I know which service was invoked.

1 Like