objective c - OS X application that can run shell commands -
I tried to ask this question, but they sent me back here.
I have created a custom How can I get all this? It can be in any language, but better It seems like there is a better way to do this for opens the specified file using the default app related to its type. The less elegant way to do this is as follows: Check the status of the file association with
TextEdit and it is working. Now I have to create an application that is custom to my custom Uses the
file association and runs
shell command to open non-proprietary applications (such as text edit, VLC, act). This app will be downloaded from the web.
objective-c
[[NSWorkspace sharedWorkspace] openFile: @ "& lt; FULL_PATH_TO_YOUR_ASSOSIATED_FILE & gt;"];
openFile
open command on your system such as < Use the foundations for the code> whereis open and the executable to change the code
NSTask * task = [[NSTask alloc] init]; [Work Set Lockpath: @ "& lt; FULL_PATH_TO_OPEN_COMMAND & gt;"]; [Work setAlgatas: @ [@ "& lt; FULL_PATH_TO_YOUR_ASSOSIATED_FILE & gt;"]] ;; [Launch the task];
Comments
Post a Comment