PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Paul Breen on March 22, 2005, 07:33:22 PM

Title: Firely covets project extension
Post by: Paul Breen on March 22, 2005, 07:33:22 PM
Firefly and Ultra-Edit both use the prj extension. How can i get these two to get along? Paul, did'nt you think that maybe the prj extension was taken a long time ago when edlin was popular?
Title: Re: Firely covets project extension
Post by: TechSupport on March 22, 2005, 07:40:56 PM
Quote from: Paul BreenFirefly and Ultra-Edit both use the prj extension. How can i get these two to get along? Paul, did'nt you think that maybe the prj extension was taken a long time ago when edlin was popular?
It is kind of hard to come up with any 3 letter extension that hasn't been used at some point. :)

To answer your question... I have no idea how to get the one extension to equate to two different programs. How in the world would Windows know which one to execute.
Title: Firely covets project extension
Post by: philipstorry on March 22, 2005, 08:33:55 PM
This is going to sound SO extremely cheeky, but...

I've had a look at the FireFly project files I've generated, and they're XML. You can pretty much garauntee that within the first 1000 bytes or so, the following string will appear:
<firefly_project
Probably even within the first 100 bytes.

So, Paul (Breen not Squires), why not knock up a quick program to check for that? If it finds it, it launches FireFly then quits. If it doesn't find it, it launches UltraEdit instead and then quits...

To be honest, I've seen the PRJ file extension used so many times for so many different programs. I don't think this problem is unique to FireFly, and I don't think that there's much benefit in Mr. Squires changing the extension or adding the functionality I describe to FireFly or creating an "assistant" package himself - if only because the number of other ".prj" file types would mean he could spend more time updating that little program with alternate programs to run than he ever would on FireFly, JellyFish Pro and Cheetah. And I want him to work on those rather than this little program. ;)

However, it would not be difficult for you to write something which solves your own specific problem - the program only becomes a lot of work when you try to make it generic so that everyone can use it.

Create a program which reads whatever file you give it on the command line, checks for the firefly_project string, and launches FireFly if it's there or launches something else if it's not, passing the filename accordingly. Test it by running it manually. Then just pop into Windows Explorer, go to Tools -> Folder Options and set up the file type to use that program you created. Congratulations, your problem is solved! :)

The program itself could be less than a hundred lines of code. It'd be a tiny little executable. And you'd have scratched your own itch, and feel satisfied.

I've almost talked myself into writing such a program as I type this! Sadly, I have far too many other projects going on right now. But I'll add it to the bottom of my list, and if ever this problem bugs me just that little too much... :D
Title: Firely covets project extension
Post by: TechSupport on March 22, 2005, 09:23:43 PM
Thanks Philip - that is a very good way to tackle this problem.

One note: The next version of FireFly will be using a different format for its Project files (they will no longer be XML). They will be regular, plain, old ascii text files. The first line of the new project text file is:


#FireFly_Project#  Version=1.50


So really you would only need to test for the #FireFly_Project# text.
Title: Firely covets project extension
Post by: Haakon Birkeland on March 22, 2005, 09:27:31 PM
XP has a "priority application", and several "alternative applications" that will be present in the "Open with.." submenu when right-clicking. Not as easy and swift as double-clicking, but not to cumbersome either..

Just a thought/question; what's with the three letter extension anyway? We've had .html and other four-letter-extensions for ages, so I guess even Win'98 should manage to cope with more than three letter file extensions?! Now we even have extensions registered that seems longer than many filenames..
Title: Firely covets project extension
Post by: Roger Garstang on March 23, 2005, 11:20:06 AM
If you look in the registry though you will see there really isn't an HTML extension.  A link is setup to associate it with the htm extension.  It was only made to work with Unix...Windows still uses 3 char extensions.  I guess we could make up some kind of links though and associate them with other extensions.  Maybe an FFP and JFP extension, and go all out and link a .FireFly and .Jellyfish extension...why limit to just 4... :P
Title: Firely covets project extension
Post by: Haakon Birkeland on March 23, 2005, 07:33:23 PM
QuoteIf you look in the registry though you will see there really isn't an HTML extension.
How's that? I mean, Windows picks up on any extension registered in the CR hive (fx. .jobotions for Acrobat Destiller), and then "links", as you say, to a second key stating which icon and explorer commands to support for the specific filetype. To me it's evident that this means Windows supports extensions of "any" lenght greater than nil, which is covered by the * key alongsode any unknown/unregistered extensions. Another few examples that goes beyond the three character limit are inDesign (.indd), MindManager (.mmap) and Illustrator that's been using to characters (.ai) for ages.

As for the .html extension, it's handled in the exact same way as the (more) common .htm extension, by the same referred to key. I don't really see how .html wouldn't qualify as a normal extension..
Title: Firely covets project extension
Post by: Marco Pontello on March 24, 2005, 05:13:59 PM
Quote from: TechSupportOne note: The next version of FireFly will be using a different format for its Project files (they will no longer be XML). They will be regular, plain, old ascii text files. The first line of the new project text file is:


#FireFly_Project#  Version=1.50
Nice to know that. I just added a new def to TrID (http://mark0.net/soft-trid-e.html) for that one! :)

Bye!