How does windows pass file name info when file is clicked?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
How does windows pass file name info when file is clicked?
Ok this may be a stupid question. In order for the end user of my app to save, I have a compiled stack that loads an un-compiled template stack. From inside the compiled stack, the user chooses "new" or "saved" If he chooses "new", the template stack is copied and the new copy is opened. if the user chooses "saved" the saved stack is copied and the copy is opened. This works perfectly for my needs, however i would like the user to be able to double click the saved file and have it open in the app. I think I have the file association part figured out, but i need to know how windows passes the file name to the app so I can run the opening process at startup without asking for the file name.
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: How does windows pass file name info when file is clicke
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: How does windows pass file name info when file is clicke
Thank you. I believe that is exactly what I needed.FourthWorld wrote:http://www.sonsothunder.com/devres/live ... ile004.htm
Re: How does windows pass file name info when file is clicke
I am still having a bit of trouble with this. Here is the code I am using, based on the given example:
The answer lines are there to help me figure out what I did wrong.
The first entry is going in fine, and answering true. The other 3 are not and are answering false. So, for some reason the registry is not taking them. Maybe you can see something wrong with my entries that I am missing.
Code: Select all
get setRegistry("HKEY_CLASSES_ROOT\.tmm\","TileMapper")
answer it
get setRegistry("HKEY_CLASSES_ROOT\TileMapper\","TileMapper document")
answer it
get setRegistry("HKEY_CLASSES_ROOT\TileMapper\DefaultIcon\","D:\Program Files\RPGenius\TileMapper.exe,1")
answer it
get setRegistry("HKEY_CLASSES_ROOT\TileMapper\shell\open\command\","D:\Program Files\RPGenius\TileMapper.exe %1")
answer it
The first entry is going in fine, and answering true. The other 3 are not and are answering false. So, for some reason the registry is not taking them. Maybe you can see something wrong with my entries that I am missing.
Re: How does windows pass file name info when file is clicke
I figured out that previous attempts were causing the registry entries to not go through and that I needed to delete those entries first. After that it worked to an extent. I still am having 1 issue. After these registry entries are made, the icon is correct but windows gives an error when the file is clicked saying "Windows cannot access the specified device, path,or file. You may not have the appropriate permission to access the item." If I do a "Open with" and set the default application it works. So what in my registry entries am I missing? I checked the file path and that seem correct.
Re: How does windows pass file name info when file is clicke
Nevermind...I figured out how to get Inno Setup to do it for me.