How to open a text a in my os x app - objective-c

I am building an os x application in which i want to open text anywhere in the system and my app should search for the corresponding word in the dictionary and show the output.
From the below picture you can see that, i want to my app in that services area just like Todoist and Twitter. And also you can see that it open this sheet, when i select a text and right clicked on it. So what should i do in order to get it.?
Also please tell me , how should i perform an action in application:openurl for this scenario, Thanks in advance.

Related

How can I make my Voice Assistant launch the apps?

I am working on a Voice Assistant.
I need to allow it to launch apps, how can be found the path of the apps to launch them?
Your question is quite minimal but I can attempt to answer it for you.
Assuming that you're using windows 10, with Word for example, you would type in word using the indexing feature at the bottom left of your desktop. Then you would click the down arrow to reveal more options. Then you would click open file location. The address at the top of your explorer will show the file location.
If you want to open another exe (or compatible software) in a known location but is not available to index, you would open your explorer and navigate to the desired application. Copy paste the address at the top of the explorer window.
You should import subprocess to your code and when you need to open the app write subprocess.check_output("file location", shell=True)
For example:
subprocess.check_output("C:\\Test\\Test\\Test\\application.exe(or .lnk or something u need)", shell=True)

PDFtron close a tool when doing Frame.GoBack()

Im using PDFtron on a windows store app project.
I have a page with a back button and a pdf viewer where i can edit the pdfs.
When im editing a pdf i have a tool bar with options like the ones in the samples, but i have a issue when i choose a Free Text tool and start writing on the pdf, if i press the back button while the Free Text tool is active ( the cursor is bliking) the text i wrote appears in the screen on the next page i navigate to.
How can i solve this?
The TextBox in question is part of the PDFViewCtrlTools that are used to create annotations. It is shipped with the sample application and is fully open source.
The TextBox is inside a popup, positioned to align itself on top of the PDFViewCtrl in the position where you tapped.
This TextBox needs to be closed before you go back. It is quite easy to do so by calling ToolManager.CreateDefaultTool(). In general, I would recommend taking a look at the samples and see what they're doing when the user tries to navigate away from the page.
Everytime you navigate away from a page with PDFViewCtrl, the ToolManager should call CreateDefaultTool so that whatever current tool is active (in this case the FreeTextCreate tool) can close itself and clean up.

Add more one button on Attach menu of Whatsapp

I've an idea to develop a modification to WhatsApp, for example now when I click attachment symbol it shows only 6 I want to add one more option to it. If it's possible let me know. I want to add more one button on Attach menu.
It is not clear what exactly you are asking.
You have an option to launch other applications from your app.
If you want to change the way a certain app looks, or behaves you have to write something similar to it for people to use, but you cannot change the original app (no one will let you)
Here you go! it's possible, as #Jef said in comments.
using documentation interaction controller.
https://www.whatsapp.com/faq/iphone/23559013
you need to work on how to hook into attachment menu.
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDocumentInteractionController_class/
There is an assumption in your question that these other apps are put there by the whatsApp developers, or by a third party who was somehow able to modify their code. I suspect that what is happening is that they (whatsApp) simply export a document/file of a certain type (UTI) If your application supports that same UTI it should appear here. So there is six buttons for you, on your phone, but another user might see a different number, it depends entirely what they have installed on their device.
CONCEPTUAL.. if you double click on a file on your computer then the file browser (OS) opens that file with some application or other. Perhaps it is a .doc file and the OS pushes that file to word or pages. Or it may be a .psd file and it gets pushed to photoshop. How does this happen? The OS has a registry (database) of applications for each file type, applications sign up on this when they install/update. If you right click on a file you see an 'open in..' option that lists all your applications which can handle that file type, this is the menu that you are wanting to get onto (for whatsApp's file type) imho.
So you need to
1 ascertain what file type (UTI) WhatsApp is exporting
2 declare support for that file type in your application (this is the bit which will be platform specific solution) (iOS docs https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/RegisteringtheFileTypesYourAppSupports.html#//apple_ref/doc/uid/TP40010411-SW1 )
**edit/addition
3. add the code to actually handle the file when your app receives it. On iOs this is in the appDelegate in
-(void) application: openURL: sourceApplication:annotation:
If the Whatsapp people have published an API then thats where you want to look. Good luck

Iphone, phone gap, childbrowser and email functionality

i have recently built my first app using phone gap and have managed to get childbrowser working to open PDF's. I was wondering if anyone knew how, or if it was even possible to add email functionality to Childbrowser. Currently, in the top right of the ChildBrowser bar, there is a button that produces a drop down with the option to open it in iBooks, SIGNificant and Dropbox, is it possible to edit this to add an email button or just add an email button straight into the UI bar?
I'm guessing that this cannot be done without using Obj-C. perhaps it will be included in later versions.

Copy text to an external program, click somewhere on the screen, then save a screenshot

I picked vb.net for this question since it's the only prgramming language I am fairly familair with, but if C++ or something else is more suited for this, I am willing to learn something new.
What I am trying to do is:
Retrieve text from database (this already works in vb.net) and copy it to clipboard
Switch primary screen to the external application I want to work with (example: word or open office)
Emulate key-press Enter
Paste text and hit Enter again
Emulate key-press Ctrl and then emulate a click on a pre-defined spot on the screen (like 500pixels from left, 740pixels from top).
Save screenshot, using a second value from the database as the filename (the naming part should be easy)
Emulate another click on another pre-defined spot
Repeat for next text in database.
I wouldn't know where to start, though. I guess the most important part of what I'm trying to achieve is; switching focus to an external application and emulate keypresses and mouse clicks on it.
use http://www.autohotkey.com/
write a console app to get the value from the database
1 - get autohotkey to run the console app and put the return into the clipboard
then continue as described in your list.