I would like to modify a file loaded by Firefox on startup (persdict.dat - this is the personal dictionary file).
What code do i need to use in order to enter an additional word into the file before it gets loaded by FireFox on browser startup?
I would like to modify a file loaded by Firefox on startup (persdict.dat - this is the personal dictionary file).
What code do i need to use in order to enter an additional word into the file before it gets loaded by FireFox on browser startup?
See https://developer.mozilla.org/en/Code_snippets/File_I%2f%2fO for sample code used to read/write from files. To get the file itself (I have no idea what persdict.dat is), try to find out if it has a chrome:// URL that can be used to access it. Otherwise, I assume it's in either the Firefox installation directory (C:\Program Files\Mozilla Firefox, or whatever) or the user's profile directory. So use the table under "Getting special files."
Almost all Firefox extensions are open source. So look for one that does what you need to do and see how they did it. I would guess that most dictionary addons have this feature?