Jump to content

Create its own type of file?


Recommended Posts

  • Developers

Is it possible to have a compiled autoit script be able to interpret its own file?

example

Interpreter opens bla.inter

The answer is yes, you can define what program you associate with which program.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Yes you can create file types easily. They don't have to be registered with Windows to work. You just have to be able to open and process it.

The FAQ's that is pinned to the top has a good example if you want to register .'inter' files.

All the extension does in any program is just associates what it opens with. You can rename an au3 to a txt and its just text. All the au3 does it tells that file to open with AutoIt=)

Link to comment
Share on other sites

You can write binary strings to files and devise your own format easily. What you call a file doesn't matter to the OS, so long as it's a unique file type. Make sure you don't name it something that already exists on your system, to avoid conflicts.

You can also devise a text format and simply rename .txt files to .whateveryouwant.

All you have to do is specify the extension with your FileOpen, FileRead, and so on.

Link to comment
Share on other sites

Do you want the file to launch a program and have a custom file type, or do you want a program to read your custom file type? I think there are some complicated registry issues with getting a custom executable filetype, while reading your own format is very simple.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...