Reproducing Mac Mail / TextEdit interaction - macos

TextEdit has this great treatment of messages dragged from the Mac Mail app — the subject line transfers as a hyperlink that when clicked opens the original message in Mail. Any thoughts how I could do the same in my app? Not having much luck with NSPasteboard; the data doesn't seem to transfer as NSURL's or NSString's. I don't think the data is totally obscure, though, as dragging a Mail message to Microsoft Word does transfer over a file URL, albeit one that doesn't open successfully.

Related

Link sms on chrome, edge or other on pc/windows

As we can see from this topic
How to pre-populate the sms body text via an html link
it is possible to generate sms links that work perfectly on smartphones.
But when I click on it on my browser while I'm on the pc running windows 10, nothing happens. The link is simply ignored even though it is totally abnormal.
Don't tell me that this is normal, NO! There is the application "My phone" which is installed and which makes it possible to send sms with the PC, to answer them, to see the notifications or even the photos of the smartphone. So the pc can send sms via this application which is from microsoft and I am on a microsoft system. I often use it to write my sms. But the browser (chrome for example, but also edge for example) does not work while they should transmit the request to the application "my phone".
My question is :
How can I add parameters to the system so that it works?
It seems like such an obvious question that I'm surprised I haven't seen similar ones on the internet despite long searches.
Thanks to those who will answer and especially to those who will give a solution.

Open File From Text Message with Nativescript?

In my nativescript iOS app, users will create a file, and then share the file via text message with other users. I'm using angular.
I expect that I can use the file system to create and save the file, and then use nativescript-share-file to open up the text message and attach the file.
BUT: how do I enable the recipient to tap on the file in the text message, and have that tap automatically open the app with the file there?
It's that piece I am not sure of: user taps on the file in the text message and this tap 1) opens the app, and 2) the app reads the file.
This is functionality a variety of apps have. For example, if you send someone a youtube video via text, they can tap on the message and have the video open in youtube. Same with sending people podcasts via iOS's podcast app.
How can I enable this in my nativescript iOS app?
EDIT 1: Note that, while sms messages have strict limits, iphone does allow you to attach files by using iMessage or (if iMessage is not available) MMS. So attaching and sending the file should not be a problem.
EDIT 2: the key is: how can I have my app open a file a user receives via text? The best way may be to include my app in iOS's "open in..." option, discussed here. But how do I do that in Nativescript?

Windows Clipboard Read Notification

Is there any way for a Windows application to get notified when another application reads from the clipboard? I would like to emphasize -- not when the clipboard content changes, but when any another application reads it.
Use Delayed Rendering. You'll receive a WM_RenderFormat when an application pastes the data into itself. (Update: But you don't know if any OTHER apps have pasted that same data. Once WM_RenderFormat has been satisfied, there are no further notifications if other apps paste that same data, using the same format. e.g. CF_TEXT).
Of course, this applies to ANY application, so you'll be notified when clipboard mangers, virtual machines, remote desktop, etc., sync the clipboard between workspaces.
See: http://msdn.microsoft.com/en-us/library/windows/desktop/ms649014(v=vs.85).aspx#_win32_Delayed_Rendering
Update: After clarification from the OP that he needs to know about clipboard reads when his app is neither the provider or consumer, then the answer for that situation is NO. It is not possible for a "neutral 3rd-party observer app" to know which specific apps have pasted data.

Sending an Email from a Firefox Extension with an Attachment

I've been developing a firefox extension, which needs to send an email through the user's email client when a button is pressed.
I've been sending email by simply using a mailto like this:
function sendEmail(buttonEvent){
gBrowser.addTab("mailto:example#example.com?subject=Hello World");
}
But I need to add an attachment to the email that is being sent.
I understand that a mailto link can have an attachment under some versions of Outlook, by using an "?attachment" like this: mailto:example#example.com?attachment=""C:\example.txt"", but I've heard that's not cross platform, has been removed from the newest versions of Outlook, so this isn't a real option.
With that in mind, is there anyway to send an email with an attachment in a Firefox extension, without using server side code?
I'm pretty certain that Firefox doesn't have this ability out of the box. This answer shows how one would do it in Delphi - apparently, using OLE is required if an attachment needs to be specified. What you could do is writing your own DLL that would implement this approach, distribute that DLL with your extension and call it via js-ctypes.
You won't get a cross-platform solution this way however, you would need to write similar native libraries for Mac OS X and Linux. And then you have the problem that the user's "mail client" doesn't have to be an application, it could be a web application - and then you definitely cannot attach files to a draft message.

How to send a string from an Apple script

I code in REALbasic.
Whenever I receive an IM via iChat, iChat runs an applescript and sends to it the last message received. I need to somehow forward this message as a string to the app I'm writing in REALbasic. REALbasic is able to respond to AppleEvents but I don't now how to implement this or if I'm even in the right ball park.
Any advice?
Unfortunately I haven´t used RB in ages, but maybe the following link (just a quick google) might be a starting point?
http://www.106automation.com/page2/RB/RB.html
(the link to download the example files is actually the title of the page, so click "REALBasic & Applescript")

Resources