Page 1 of 1

Is it possible to use love to create a program opens files?

Posted: Mon Nov 17, 2014 2:27 pm
by m31317015
---Rubbish---
When I touch java, I met Minecraft.
When I touch Minecraft, I touch Forge.
When I touch Forge, I touch ComputerCraft.
When I touch CC, I touch Lua.
When I touch Lua, I touch Love2D.
When I touch Love2D, I wonder what I can do with Minecraft using Love2D? Then I got an idea - Minecraft Server Operation.
---Rubbish---

Well Don't care about those pieces of rubbish, throw them to the rubbish bin (Although they are true). The main point is is that possible to create a program which can open files with a specified program, like use java to open a minecraft server, with LOVE2D.
I love Minecraft and Lua(& Love2D of course), so can I combine these two together?
btw I'm a noob of Lua and LOVE2D, I just play around LOVE2D in my own interest.

Re: Is it possible to use love to create a program opens fil

Posted: Mon Nov 17, 2014 3:17 pm
by Nixola
While it is possible, you'd want to practice both your Lua and your networking skills before ever trying to create a game server.

Re: Is it possible to use love to create a program opens fil

Posted: Mon Nov 17, 2014 7:02 pm
by s-ol
m31317015 wrote:---Rubbish---
When I touch java, I met Minecraft.
When I touch Minecraft, I touch Forge.
When I touch Forge, I touch ComputerCraft.
When I touch CC, I touch Lua.
When I touch Lua, I touch Love2D.
When I touch Love2D, I wonder what I can do with Minecraft using Love2D? Then I got an idea - Minecraft Server Operation.
---Rubbish---

Well Don't care about those pieces of rubbish, throw them to the rubbish bin (Although they are true). The main point is is that possible to create a program which can open files with a specified program, like use java to open a minecraft server, with LOVE2D.
I love Minecraft and Lua(& Love2D of course), so can I combine these two together?
btw I'm a noob of Lua and LOVE2D, I just play around LOVE2D in my own interest.
Your line of argument would mean running Love2D in minecraft. Not the other way around.

Also I don't see why the heck you would want to do either - love2d is a graphics toolkit - plain lua can do the rest anyway.

Re: Is it possible to use love to create a program opens fil

Posted: Wed Nov 19, 2014 11:01 am
by m31317015
S0lll0s wrote:Your line of argument would mean running Love2D in minecraft. Not the other way around.

Also I don't see why the heck you would want to do either - love2d is a graphics toolkit - plain lua can do the rest anyway.
I didn't mean that, I just want to know is that possible to do something like open files in the real computer (Windows) using LOVE2D. I'm too lazy to do some more advanced thingy.

Re: Is it possible to use love to create a program opens fil

Posted: Wed Nov 19, 2014 11:55 am
by s-ol
m31317015 wrote:
S0lll0s wrote:Your line of argument would mean running Love2D in minecraft. Not the other way around.

Also I don't see why the heck you would want to do either - love2d is a graphics toolkit - plain lua can do the rest anyway.
I didn't mean that, I just want to know is that possible to do something like open files in the real computer (Windows) using LOVE2D. I'm too lazy to do some more advanced thingy.
Of course. Love is lua and lua can do things. But why do you ask if you don't want to do anything?

Re: Is it possible to use love to create a program opens fil

Posted: Wed Nov 19, 2014 3:48 pm
by zorg
Then your question's answer is a simple "yes, but with lua's own io functions; but you shouldn't, since they are either not friendly to the end-users, or not wholly cross-platform, or has some other problem; probably all three."

Re: Is it possible to use love to create a program opens fil

Posted: Fri Nov 21, 2014 5:45 am
by natev
There's justifiable reasons to want to do this! For instance, loading a wiki page in the user's browser, whatever that may be. I would personally love to launch a default text editor for the users to edit important lua files (really, the easiest way to execute one-time scripts, things like console commands).

Here's a post from stackoverflow that may help. Sounds like there are problems with the implementation, so maybe not.

Re: Is it possible to use love to create a program opens fil

Posted: Fri Nov 21, 2014 9:25 am
by slime
natev wrote:loading a wiki page in the user's browser, whatever that may be.
You can use [wiki]love.system.openURL[/wiki] for that.