Is it possible in LÖVE to make a program that loads up a menu screen, and select a program such as an .exe or a different file type association?
So, for example, I make a LÖVE program that views files inside a certain folder. The folder contains files, such as, .png files. The program just lists the name of a file, and when you click on it, the LÖVE program exits, and it opens the .png you selected, with the program that normally opens .png files (normally with Windows Photo Gallery/Viewer).
So, is this possible?
If it is, the only thing I'd want different, would be for each file, you can add a image to it. Like, I make a LÖVE program for opening PC games, and I put the shortcut/.exe for the game in the folder, and add a image inside the .love file.
But, I'm going over my head here now. Is this possible?
LÖVE Question - Opening Files Program
- Mr.Q.Marx?
- Posts: 849
- Joined: 15 May 2012, 18:35
Code: Select all
if love.keyboard.isDown("m") then
os.execute("applicatiom.png")
os.execute("applicatiom.exe")
love.event.push('q')
end
love.event.push('q') has been renamed to love.event.quit() in 0.8.0Code: Select all
if love.keyboard.isDown("m") then os.execute("applicatiom.png") os.execute("applicatiom.exe") love.event.push('q') end
Also, I'm not sure why you would want to execute a png, then immediately after execute an .exe.
And your code is Windows-only.
(On linux, it's os.execute("xdg-open your_file.ext") to open a file with whatever program is right for that. Mac os is the same, but with "open" instead of "xdg-open")
- Mr.Q.Marx?
- Posts: 849
- Joined: 15 May 2012, 18:35
I honestly don't know. I had difficulty understanding the brief.