file-association

ClickOnce application does not start through Process.Start(“x.abc”) with *.abc associated to the ClickOnce application

家住魔仙堡 提交于 2019-12-18 12:18:10
问题 I have successfully developed and deployed a ClickOnce application which registers an associated file extension, for instance *.abc . When I click on a file named x.abc or if I type x.abc from the command prompt, the ClickOnce application starts, and I can retrieve the file through the dedicated API. I can also launch the application programmatically with the following code: System.Diagnostics.Process.Start ("x.abc"); Everything works fine on my Windows Vista 64 bit box. However, if I try to

Open specific file type with Python script?

谁说胖子不能爱 提交于 2019-12-18 05:49:11
问题 How can I make a Python script to be a specific file type's (e.g., *.foo) default application? As in, when I double click the file in the Finder / Explorer I want the file to open in the Python script. Is this possible to do in Win and/or OS X? The application is a PySide app if that matters. 回答1: Mac OS X On Mac OS X you can use Automator to create an application that calls your python app and passes the input file path as a string argument. In the application workflow wizard, add action

How do I associate a filetype with an icon?

拟墨画扇 提交于 2019-12-18 05:07:15
问题 I have written preview handlers for a couple custom file types. These file types don't have an application by default that can open them. I want to associate an icon with the file types as a signifier that they are custom. I have tried setting a registry entry for DefaultIcon in HKCR\.<filetype> , but it doesnt appear to work, even after reboots. I do these registry modifications from C#, and the modifications are successful. The icon file is simply an ico file residing in %APPDATA% for the

Perl on Windows, file associations and I/O redirection

…衆ロ難τιáo~ 提交于 2019-12-18 04:16:32
问题 Can someone explain the difference between calling a perl script via file association versus calling the same script explicitly via perl.exe ? Apparently I/O redirection doesn't work very well when the script is called via file association, and I would really like to know why. E.g. take a look at the Activestate FAQ for Perl on Windows. The cat file example works perfectly as long as the script doesn't receive its input via redirection. So cat file.txt works as expected, but whoami | cat.pl

How to associate file type with MacOS X App without launching it first?

戏子无情 提交于 2019-12-17 13:58:26
问题 I would like to associate the last installed version of my Mac OS X application with a certain type of file. A little experimentation shows that the info.plist file seems to be read and interpreted by the operating system when launching the application, not when dragging the application bundle to the disk. Apple's documentation on run-time configuration does not say much on that topic. Is there any way, using a simple .dmg image as installation medium, to make sure the system associates that

Utilising a file association in a Java application

不打扰是莪最后的温柔 提交于 2019-12-17 09:58:41
问题 I am in the process of writing a cross platform Swing based application in which I want to utilize a file association which has been registered with the OS. So iv got to the point where I can click on a file and my app loads, but what I need to know is how I can get my application to know where the file is that launched it and then query the contents. Is there something further I have to do with the file association registration? Or can Java do this for me? 回答1: I'm not positive, but I'd

Android File Associations

∥☆過路亽.° 提交于 2019-12-13 18:28:48
问题 My Manifest: <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="http" android:host="*" android:pathPattern=".*mht" /> <data android:scheme="https" android:host="*" android:pathPattern=".*mht" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category

How to associate Python scripts with active virtualenv?

点点圈 提交于 2019-12-13 04:32:45
问题 After I activate specific virtualenv I'd like to have Python scripts, which I run using only their name ( script.py ), be executed using Python interpreter from virtualenv. How to do this? It's a followup to the Why doesn't virtualenv on Windows associate .py/.pyw/.pyo/.pyc files with virtualenv's version of Python executables? question. 回答1: Thanks to great work of Vinay Sajip, creator of Python Launcher (also called pylauncher) and this commit made by Paul Moore we can enjoy running Python

How to associate a file with a program in java

你。 提交于 2019-12-13 02:25:04
问题 Take notepad for example. You can open a file with notepad (right click and open with, or double clicking on the file if it is already associated with notepad) and it will display the contents of a file. I want to be able to open an xml file with the program that I am writing so that it can do some parsing and give a desired output. What sort of ways are there to do this in java? Do I have to ask for an argument to be passed into the program when it is opened? Would this be easier in C++ or

How to associate a file type with a (my) Java application on OSX?

狂风中的少年 提交于 2019-12-13 00:41:19
问题 I want to be able to double click on textfile.myext and have my java program open and handle the file. How should I go about making my program accept files that are set as default to open in said program? What are the steps and what is passed to the program after something is set as default? 回答1: Deploy the app. using Java Web Start, which provides.. ..splash screens, desktop integration, file associations, automatic update (including lazy downloads and programmatic control of updates),