Questions tagged [open-with]

Most operating systems have an option when browsing the filesystem to open a specific file with an application that the user chooses. Of course, this means sending arguments to a program in one way or another, and that the programmer must add some way of recognizing these arguments and using them to process the data.

102 questions
4
votes
1 answer

How do I open a file with my own program and have it invoke another program?

task: I would like to create my own file extension so that when I click on a particular "dot" file, my program will open it. However, this program I wrote, is just a middle-man in that it will do some processing, but ultimately pass that file onto…
Trevor Hickey
  • 36,288
  • 32
  • 162
  • 271
3
votes
1 answer

"Open with" - C# program shows just icon in Windows "Open With" context menu

I have a program, MyApp, where I can open a text file, which works great. The application is created in C# with Visual Studio 2003, .NET 1.1. But under the [right-click on file context-menu in Explorer -> "Open With"] just the icon is shown, not the…
Hrym
  • 578
  • 6
  • 8
3
votes
0 answers

How to tell if a browser can open a certain file type?

TL;DR Is there a way for a web page (using Javascript or anything else) to tell if Firefox (in particular) or any browser (in general) knows how to open a file having a given extension ? Especially when it's a *.jnlp file ? Can't rely on MIME type…
Obsidian
  • 3,719
  • 8
  • 17
  • 30
3
votes
0 answers

Open an emailed text file with my swift2 iOS app

I have read this: open text files with my ios app and it's great in the fact that it allows me to see my app as one of the options to open it with and when selecting my app it opens my app but that's it. There are two problems: First of all, while…
Adam
  • 2,070
  • 1
  • 14
  • 18
3
votes
2 answers

In Obj-C, how to programmatically set the default "open with" property of a file in Mac OS X

In creating some .mov files using Cocoa (Obj-C), I'd like to set them to be opened by default by a specific program, instead of the default. This should be a file level property, I do not wish to change the default program for all files with the…
apalopohapa
  • 185
  • 3
  • 11
2
votes
1 answer

emacs/openwith how to pass arguments to program?

I am using the openwith package in emacs. I would like to open .fig files with xfig with some additional options, for example: xfig -specialtext -latexfont -startlatexFont default file.fig openwith is working for me with other file associations…
sanjshakun
  • 535
  • 4
  • 13
2
votes
1 answer

Opening a text file with your python script

I have created a program that can edit the contents of a text file. Assume that my program looks something like this: from tkinter import * from tkinter import filedialog root = Tk() def open_file(): file_to_open =…
Lenovo 360
  • 569
  • 1
  • 7
  • 27
2
votes
1 answer

Why does "tree = ElementTree.parse(f)" give the error "TypeError: parse() missing 1 required positional argument: 'source'" while arg is present

I have a piece of code in a function definition which is: try: with open(requests,'rt') as f: tree = ElementTree.parse(f) The string, requests, contains a file path and apparently that file is opened. At the beginning of the…
Freek
  • 21
  • 1
  • 2
2
votes
1 answer

C# WPF App silently crashes if I use "open with"

I am making a text editor in C# WPF. After publishing the project to a folder, I can double-click the .exe, it runs fine, and I can load files using my Open (CTRL+O) function perfectly fine. I want to use Open with > Choose another app > More apps >…
Micsupreeme
  • 55
  • 10
2
votes
1 answer

Is there any way to open link URL in My Flutter Application?

I received forgot password link in my email and I want to open it in my already installed application. Is there any solution available for the same in flutter? For reference, I am attaching one screenshot of Magicbricks:
Dhaval Kansara
  • 3,478
  • 5
  • 22
  • 50
2
votes
2 answers

Java accessing Window's "Open with..." list

I would like to get the list of "Open with..." contextual menu in Windows XP/Vista/7 from Java. From the Windows Registry, I've managed to find a way to get the command to launch applications. But I did not find out how to get these applications…
Béatrice Cassistat
  • 1,048
  • 12
  • 37
2
votes
1 answer

Programmatically building applications for "Open with..." on Mac

I'd like to create a program which uses certain information given by my program's users and bakes this info into executables which can be used with Mac's "Open with...". Since bash scripts cannot be used directly for Mac's "Open with..."…
Brett Zamir
  • 14,034
  • 6
  • 54
  • 77
2
votes
1 answer

How to get the OpenWith list from the Registry?

This Windows Registry Key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts ...supposedly contains the file extensions registered with Windows Explorer. I try to programmatically read the OpenWith list for specific file…
user1580348
  • 5,721
  • 4
  • 43
  • 105
2
votes
0 answers

Right click and "Open with..."

I have an image displayed with an ImageView. When I perform a right click on it, I want to be able to choose a program to open the image with (ie. have an "Open With" menu item like on Windows). I know the solution to open the image with the…
2
votes
1 answer

UIDocumentInteractionController presentOptionsMenuFromBarButtonItem don't open app

I use UIDocumentInteractionController presentOptionsMenuFromBarButtonItem to open PDF in Adobe Reader app, send it with Mail and print it. Mail and print work fine but I'm unable to open any other app. I tried presentOpenInMenuFromBarButtonItem and…
olivierplante
  • 185
  • 2
  • 11