Adding item to Contextual menu and send highlighted text to other app on MacOS - swift

I'm trying to add a item to the global contextual menu in MacOS. Not by the user but by the app I'm writing.
Here's the scenario:
User installs my app, which should add the item to contextual menu.
When in another program the user highlights some text and "right clicks"/brings up contextual menu where the item added by my application should be shown.
Anyone know how to do this?
I can't seem to find any documentation on how to add a item to the global contextual menu in macos without the user adding it as a service them selfs. I wan't this to be done when installing the app.

What you're describing is known as a "Service". The facility in general is sometimes known as Cocoa Services. See the Services Implementation Guide for details on how to have your app provide a service.

An alternative solution would be to create a share extension.
You could read about extensions here and specifically about share extension here.

Related

Creating extensions - Publisher display name

Is it possible to change only the display name of the publisher?
A similar question already asked here, but I don't want to move the extension to an other publisher id.
I created an extension, but it displays my "username", it would be great, if it's possible to display the company name I'm working for (for instance "Microsoft" extensions).
I already tried to change the name in the package.json (__metadata), but it only works while debugging. Thanks for your help.
Yes this possible. You just need to go to he marketplace and press the button Publish extensions (in the top right corner). After you logged in you should see your extensions. Now switch to the Details tab where you can change the Name field.

How to make a background macOS application?

I'm trying to develop a macOS app that performs operations on a file when the user chooses to do so. My goal is to let a user right-click a file, select my app from the list of services so that the app will pop open a UI with things like configuration options, etc.
A prime example would be Evernote's "Add to Evernote"; when a user clicks it, the Evernote app opens and saves the file there. In addition, I need to switch control to the UI, so that the user can input some settings, before performing any file operations.
The place where I'm stuck now is how to get the app/UI open when the user clicks it from the contextual menu, as well as keeping the UI hidden initially. From some googling, I think what I need to make is an agent? I'm not really sure.
Any help would be appreciated, thanks!

DNN Extensions fail to load DNN 7.4.2

My first DNN site. Please go easy.
I'm trying to load some extensions (Blog & a PayPal extension).
While the admin console show's they're installed I can't see them or start them. They are not evident on any of the menus.
The theme creators say its not their problem.
Any suggestions for a Newby on how to get the extensions working?
thanks
You actually need to go to the page where you want a module to live and then use the Modules admin menu entry to Add New Module to the page. Click the menu entry, and you can drag and drop a module onto the page.
Yes.
They're listed and "In Use" is recorded OS "No"
OK - here's a screenshot of the Admin Page in Edit Mode whilst loggedon as a Super User after an Extension Module has been added to the page.
As you can see:
The extensions are not showing
Instead the area on the page shows 'Banner Options' even though no banners were inserted.
You are on the Admin page, and it certainly looks like you have added two modules to the bottom of the page. One of them seems to be the Banners module, as the screenshot shows that mousing over the edit pencil icon shows the Banner Options.
My guess is that this isn't close to what you want to do.
I think that what you want to do is to add a module or modules to some other pages.
So, go to the page to which you want to add a module. Then, click or mouseover the Modules menu item in the admin menu. Select a module and add it to the page.
Does that make more sense?

add functionality layer to AtTask by plug-in on Internet Explorer

I would like to add functionality to the AtTask system by "adding a layer".
What I want to know is whether this can be achieved with a plug-in for Internet Explorer.
To give a concrete example:
This extra layer would allow users to click on "Online Edit" document (which is not available right now). The linked application will open, and when you click save, the file is loaded back to AtTask.
All this happens in the background via the AtTask API, and is transparent to the user.
The question is: is it possible to add functionality to a site by somehow adding layers?
Last comment: this plug-in (or whatever needs to be installed inbto the browser) will only be visible/active when accesing the AtTask website.
Thanks in advance for your responses.
Within the confines of AtTask your best bet is to use an "External Page" create a service that handles the data in the manner you need.
The Dashboard that contains your External Page can be added as a tab via Layout Templates.
Most of the heavy lifting would have to be handled by your application. You would have to link the document(s) you wish to edit.
Some sort of referrer would be necessary to place the revised document back into AtTask. The method in which the client can do this would be determined by your preference and requirements. I am sure you can find some sort of Wiz-Bang jQuery uploader.
Depending on the level of control you have with your user base, you could make an Application URL
Windows : Registering an Application to a URI Scheme
OS X : Launching Scripts from Webpage Links
I do not know of any other way to handle this other than what Steve suggested.
Having said that a possible solution to this is to create a new application and iframe in AtTask.
At the top or wherever on the page your application could have a link for "Online Edit". Then you would use javascript to extract the task id, project id or any other needed information you need for the api to get the needed content to edit. Then save using the same api information.
I have not tried this type of method but theoretically it could work.

MOSS 2007 - Customize Send To Menu

We currently have a need to add a custom menu item to the Send To menu within our document libraries that would allow a user to create a link to the currently selected list item within another library. When the user clicks on the new "Send Link to..." menu item, they should be prompted to browse to the library in which the link should be added. Once the user chooses a destination, the link, along with the metadata from the list item, should magically appear in the selected desitnation library. Once again, we only want a link, not a copy of the file. Is this possible to do? Code examples would be much appreciated.
Does it have to be in the send to menu? Can it also be directly in the context menu (say at the bottom)? If so, you can create a feature that deploys a CustomAction to the site. If it really, REALLY needs to be under the "send to" menu, you are going to have to use javascript (since that is how the out of the box context menu is created) to "hijack" the menu and insert your own item.
IMHO this is rarely needed, a CustomAction is the preferred way of doing this. It is the easiest and most "maintainable" (all it is is a feature + customaction definition with maybe some code, all of which are deployed using a solution).
More info on CustomActions here.
P.S. if you do decide to go with javascript, don't go editing the out of the box sharepoint js files in SharePoint's 12 Hive, but add a ContentEditorWebPart to the page and insert your Javascript in there.
P.P.S. While assigning a method from an assembly as the action for a CustomAction is allowed in most cases, it is not for the ListEdit (item) context menu.
What they say is that "Sharepoint server 2010 will have it out of the box", i.e. documents may stay where they were created and links go to the Records center (named "In Place Records Management, see http://www.cmswire.com/cms/document-management/the-scoop-sharepoint-2010-records-management-005948.php).
MOSS 2007 requires the actual document to be copied to the Records repository to be registered.