I want to be able to open files that are either dragged into the exe (not running) or opened with explorer. What l mean is like opening a video file using vlc by either double clicking it or opening with vlc before it is running (right click - open with - vlc...).
Make the executable open a file on start
Started by master123, Mar 09 2012 11:45 AM
3 replies to this topic
#1
Posted 09 March 2012 - 11:45 AM
#2
Posted 09 March 2012 - 12:00 PM
You need a DLL to be able to drag files to the window but you can start the program from files by using the parameter functions in the "game start"-event.
Not 100% sure about the following part, its been a while since I tried it:
Keep in mind that the program will think that it is running from the folder from which the file executed the program.
For example, it will change working_directory to the file folder.
if parameter_count() > 0
{
fileToOpen = parameter_string(1)
}Not 100% sure about the following part, its been a while since I tried it:
Keep in mind that the program will think that it is running from the folder from which the file executed the program.
For example, it will change working_directory to the file folder.
Edited by filulilus, 09 March 2012 - 12:06 PM.
#3
Posted 10 March 2012 - 05:43 AM
i tried that last time it did not work, but tried it again and it worked.... funny!
Any way i am trying to make my program a defalt program for the file extension how do i do that.
Any way i am trying to make my program a defalt program for the file extension how do i do that.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











